hydrogen Storefront Environment Variable Bulk Replace
Requires Request must be initiated from the Shopify CLI and user must have full access to apps or access to the Hydrogen channel.
Replaces all environment variables for a specific Hydrogen storefront environment in a single atomic operation. This mutation provides a complete replacement strategy rather than individual variable updates, ensuring consistent environment configuration.
For example, when deploying a new version of your Hydrogen storefront that requires a different set of API keys, database URLs, and feature flags, you can replace the entire environment configuration at once rather than updating variables individually.
Use to:
- Deploy complete environment configurations during releases
- Synchronize development and production environment settings
- Reset environment variables to a known baseline state
- Migrate between different configuration schemas
This bulk replacement approach helps prevent configuration drift and ensures all related variables are updated together, reducing the risk of partial updates that could break your storefront functionality.
Learn more about Hydrogen deployment.
Arguments
- Anchor to environmentIdenvironment•ID!
Id required The environment ID for which the variables will be set.
- Anchor to environmentVariablesInputenvironment•[Hydrogen
Variables Input Storefront Environment Variable Input!]! required An array of objects, each representing an environment variable to be created.
- Anchor to storefrontIdstorefront•ID!
Id required The ID of the storefront.
Anchor to HydrogenStorefrontEnvironmentVariableBulkReplacePayload returnsHydrogen Storefront Environment Variable Bulk Replace Payload returns
- Anchor to userErrorsuser•[Environment
Errors Variables User Error!]! non-null The list of errors that occurred from executing the mutation.