Back to Relay

Why Is My Field Not Found?

website/versioned_docs/version-v18.0.0/error-reference/unknown-field.md

20.1.11.1 KB
Original Source

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. :::

</FbInternalOnly> <DocsRating />