Anchor to hydrogenStorefrontEnvironmentVariableBulkReplacehydrogen
hydrogen Storefront Environment Variable Bulk Replace
mutation
Requires Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.
Replaces a given environment's variables.
Anchor to Arguments
Arguments
- Anchor to environmentIdenvironment•
Id ID!required The environment ID for which the variables will be set.
- Anchor to environmentVariablesInputenvironment•
Variables Input An array of objects, each representing an environment variable to be created.
- Anchor to storefrontIdstorefront•
Id ID!required The ID of the storefront.
Was this section helpful?
Anchor to HydrogenStorefrontEnvironmentVariableBulkReplacePayload returnsHydrogen Storefront Environment Variable Bulk Replace Payload returns
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation hydrogenStorefrontEnvironmentVariableBulkReplace($environmentId: ID!, $environmentVariablesInput: [HydrogenStorefrontEnvironmentVariableInput!]!, $storefrontId: ID!) {
hydrogenStorefrontEnvironmentVariableBulkReplace(environmentId: $environmentId, environmentVariablesInput: $environmentVariablesInput, storefrontId: $storefrontId) {
userErrors {
field
message
}
}
}
Input
{
"environmentId": "gid://shopify/<objectName>/10079785100",
"environmentVariablesInput": [
{
"isSecret": true,
"key": "<your-key>",
"value": "<your-value>"
}
],
"storefrontId": "gid://shopify/<objectName>/10079785100"
}
{
"environmentId": "gid://shopify/<objectName>/10079785100",
"environmentVariablesInput": [
{
"isSecret": true,
"key": "<your-key>",
"value": "<your-value>"
}
],
"storefrontId": "gid://shopify/<objectName>/10079785100"
}
input HydrogenStorefrontEnvironmentVariableInput {
isSecret: Boolean
key: String!
value: String!
}