catalogContextUpdate not working

Topic summary

A user encountered an error when attempting to use the catalogContextUpdate GraphQL mutation. The mutation returned an error message stating “Must have add_to_contexts or remove_to_contexts argument.”

Issue Details:

  • The user was sending a contextToAdd variable but receiving the error about missing required arguments
  • Images were shared showing the original variable structure and error response

Resolution:

  • The user successfully resolved the issue by modifying the query structure
  • A follow-up image demonstrates the corrected query format that resolved the error

Status: Resolved - the user identified the necessary query changes independently.

Summarized with AI on November 16. AI used: claude-sonnet-4-5-20250929.

Hi all, I’m trying to use the catalogContextUpdate GraphQL mutation. I haven’t had any trouble using many of the GraphQL mutations but this one doesn’t work. Below is the variable I’m sending.

When I send I get the error “Must have contexts_to_add or contexts_to_remove argument”. I’m not sure what this means since I’m sending contextToAdd. Any help is appreciated. Thanks in advance.

I was able to figure it out, the query needed to be changed as follows: