--- title: catalogContextUpdate - GraphQL Admin description: Updates the context of a catalog. api_version: 2025-10 api_name: admin type: mutation api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/mutations/catalogcontextupdate md: https://shopify.dev/docs/api/admin-graphql/latest/mutations/catalogcontextupdate.md --- # catalog​Context​Update mutation Requires `write_products` access scope. Also: The user must have permission to create and edit catalogs. Updates the context of a catalog. ## Arguments * catalog​Id [ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID) required The ID of the catalog for which to update the context. * contexts​To​Add [Catalog​Context​Input](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CatalogContextInput) The contexts to add to the catalog. * contexts​To​Remove [Catalog​Context​Input](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/CatalogContextInput) The contexts to remove from the catalog. *** ## Catalog​Context​Update​Payload returns * catalog [Catalog](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Catalog) The updated catalog. * user​Errors [\[Catalog​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/CatalogUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### catalogContextUpdate reference ## Mutation Reference ```graphql mutation catalogContextUpdate($catalogId: ID!, $contextsToAdd: CatalogContextInput, $contextsToRemove: CatalogContextInput) { catalogContextUpdate(catalogId: $catalogId, contextsToAdd: $contextsToAdd, contextsToRemove: $contextsToRemove) { catalog { # Catalog fields } userErrors { field message } } } ``` ## Input ```json { "catalogId": "gid://shopify//10079785100", "contextsToAdd": { "marketIds": [ "gid://shopify//10079785100" ], "companyLocationIds": [ "gid://shopify//10079785100" ] }, "contextsToRemove": { "marketIds": [ "gid://shopify//10079785100" ], "companyLocationIds": [ "gid://shopify//10079785100" ] } } ``` ##### Variables ``` { "catalogId": "gid://shopify//10079785100", "contextsToAdd": { "marketIds": [ "gid://shopify//10079785100" ], "companyLocationIds": [ "gid://shopify//10079785100" ] }, "contextsToRemove": { "marketIds": [ "gid://shopify//10079785100" ], "companyLocationIds": [ "gid://shopify//10079785100" ] } } ``` ##### Schema ``` input CatalogContextInput { marketIds: [ID!] companyLocationIds: [ID!] } ```