Can't find i18n fields in GraphQL after deploying document-internationalization plugin

58 replies
Last updated: Jan 28, 2026
Hello Sanity team, I am trying to use the document-internationalization plugin which works well with GROQ but I am struggling to follow the GraphQL doc (https://github.com/sanity-io/document-internationalization/blob/main/docs/graphql-intl-doc.md ). I can edit the document but once deployed, I can’t find any i18_* field. Would you have any example please? Many thanks!
AI Update

I can see you're having trouble finding the i18n_* fields in your GraphQL API after deploying. The issue is that the GraphQL documentation file you're referencing no longer exists in the plugin repository – it returns a 404 error, which explains why you're struggling to follow it.

Here's what's actually happening with the document-internationalization plugin and GraphQL:

How the Plugin Actually Works

The plugin uses a metadata document approach. When you create translations:

  1. Your content documents (like a lesson document) remain as separate documents for each language
  2. A special translation.metadata document is created that links all the language versions together
  3. Each content document gets a language field (or whatever you configure via languageField)

The __i18n_lang, __i18n_base, and __i18n_refs fields are internal metadata fields that exist on the translation.metadata document type, not directly on your content documents.

The GraphQL Challenge

The plugin was primarily designed for GROQ queries, and GraphQL support has significant limitations. The metadata document structure doesn't expose these internal fields in a straightforward way through GraphQL.

Option 1: Use GROQ (Recommended)

Since you mentioned GROQ works well, stick with it. You can query by the language field on your documents:

*[_type == "lesson" && language == "en"]

Option 2: Query via the language field in GraphQL

Your content documents should have a language field that you can query in GraphQL:

query {
  allLesson(where: { language: { eq: "en" } }) {
    _id
    title
    language
  }
}

Make sure you've run sanity graphql deploy after adding the plugin.

Option 3: Check the Sanity Community

The original community thread you may have seen discusses these exact limitations. The missing documentation suggests GraphQL isn't a fully supported path for this plugin.

The key takeaway: the plugin's GraphQL support is limited by design. The internal i18n_* fields aren't meant to be directly queried through GraphQL – instead, use the language field on your content documents to filter by language.

Show original thread
58 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?