UNPKG

relay-runtime

Version:

A core runtime for building GraphQL-driven applications.

37 lines (26 loc) 1.35 kB
--- id: unknown-field title: "Why Is My Field Not Found?" slug: /error-reference/unknown-field/ description: Get help figuring out why a given field is not found. keywords: - no such field on type - missing - field - type - compilation - error --- import {FbInternalOnly} from 'docusaurus-plugin-internaldocs-fb/internal'; import DocsRating from '@site/src/core/DocsRating'; ## [ERROR] Error in the project `some_project`: ✖︎ The type `Some_Type` has no field `some_unknown_field`. ### Field name typo In case of a missing field in a type, the Relay compiler tries to find and suggest a field replacement. For example: ```Error in the project `some_project`: ✖︎ The type `UserInfo` has no field `mail`. Did you mean `email`?``` <FbInternalOnly> ### The field exists in another schema Relay Compiler uses schemas in order to resolve types and their fields. The type's schema is determined by the file path and the mapping from file path to schema, which is configured in the "schema" or "schemaDir" properties of your Relay compiler config. If you expect this field to exist, make sure you're using the right schema. :::note At meta there are various project config files that are listed [here](https://www.internalfb.com/intern/wiki/Relay-team/Rust_compiler_resources/#where-are-the-project-co). ::: </FbInternalOnly> <DocsRating />