---
title: hydrogenStorefrontEnvironmentVariableBulkReplace - GraphQL Admin
description: >-
  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 `HydrogenStorefrontEnvironmentVariableBulkReplace` 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](https://shopify.dev/docs/custom-storefronts/hydrogen/deployment).
api_version: unstable
api_name: admin
source_url:
  html: >-
    https://shopify.dev/docs/api/admin-graphql/unstable/mutations/hydrogenStorefrontEnvironmentVariableBulkReplace
  md: >-
    https://shopify.dev/docs/api/admin-graphql/unstable/mutations/hydrogenStorefrontEnvironmentVariableBulkReplace.md
---

# 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 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 `HydrogenStorefrontEnvironmentVariableBulkReplace` 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](https://shopify.dev/docs/custom-storefronts/hydrogen/deployment).

## Arguments

* environment​Id

  [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID)

  required

  The environment ID for which the variables will be set.

* environment​Variables​Input

  [\[Hydrogen​Storefront​Environment​Variable​Input!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/HydrogenStorefrontEnvironmentVariableInput)

  required

  An array of objects, each representing an environment variable to be created.

* storefront​Id

  [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID)

  required

  The ID of the storefront.

***

## Hydrogen​Storefront​Environment​Variable​Bulk​Replace​Payload returns

* user​Errors

  [\[Environment​Variables​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/EnvironmentVariablesUserError)

  non-null

  The list of errors that occurred from executing the mutation.

***

## Examples

* ### hydrogenStorefrontEnvironmentVariableBulkReplace reference
