Unknown directive inContext

Topic summary

A developer is encountering an “unknown directive inContext” error when attempting to use the @inContext directive in their GraphQL query to fetch products in a specific language. The error appears during validation in Postman.

Key Finding:
Another participant discovered that the @inContext directive does not work with the GraphQL Admin API—it only functions with the Storefront API.

Current Status:
The issue remains unresolved for the original poster, who is seeking guidance on what they might be doing wrong. A screenshot was attached showing the specific error message.

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

Hi there,

I am trying to use the @inContext directive on my query to fetch products in a specific language. Unfortunately I get an error in Postman saying “unknown directive inContext” on the validation and “Directive @inContext is not defined” when running the query.

See screenshot attached. What am I doing wrong?

Hey, I’m still trying to figure this out.

Apparently, the @inContext directive does not work with the GraphQL Admin API, only with the Storefront API.

1 Like