hasura/graphql-engine · error · ObjectTypesIssue
Field type {field_type} could not be found in field {field_n
Error message
Field type {field_type} could not be found in field {field_name} for object type {object_type_name} What it means
A field references a custom type (field_type) that has not been defined in the metadata's object type collection, so the resolver cannot build the field's type representation.
Source
Thrown at v3/crates/metadata-resolve/src/stages/object_types/types.rs:476
#[error(
"Multiple {function_name} extraction functions found for type {scalar_type} in data connector {data_connector_name}"
)]
DuplicateExtractionFunctionsDefined {
scalar_type: ndc_models::ScalarTypeName,
function_name: String,
data_connector_name: Qualified<DataConnectorName>,
},
#[error(
"the field {field_name:} in {type_name:} should have the type {expected:} for data connector {data_connector:} but the field has type {provided:}"
)]
FieldTypeMismatch {
field_name: FieldName,
type_name: Qualified<CustomTypeName>,
data_connector: Qualified<DataConnectorName>,
expected: QualifiedTypeName,
provided: QualifiedTypeName,
},
#[error(
"Field type {field_type} could not be found in field {field_name} for object type {object_type_name}"
)]
FieldTypeNotFound {
field_type: Qualified<CustomTypeName>,
object_type_name: Qualified<CustomTypeName>,
field_name: FieldName,
},
#[error(
"Recursive reference detected for object type '{type_name}' through non-null field path: {field_path}"
)]
RecursiveObjectType {
type_name: Qualified<CustomTypeName>,
field_path: String,
},
#[error(
"The field '{field_name}' in object type '{type_name}' cannot be mapped to data connector '{data_connector}' field '{data_connector_object}.{data_connector_column}' because: {issue}"
)]
FieldTypeNdcMappingIssue {View on GitHub (pinned to 724551b9ae)
Solutions
- Define the missing object type named in field_type in the CustomTypes metadata
- Check for typos between the field's declared type name and the defined object type name
- If the type was renamed, update field references to the new name
Defensive patterns
Strategy: validation
Validate before calling
// Ensure every referenced field type is defined
const defined = new Set(objectTypeNames);
for (const t of objectTypes) for (const f of t.fields) {
if (isCustomType(f.type) && !defined.has(baseTypeName(f.type))) throw new Error(`Undefined type ${f.type} for field ${f.name}`);
} Prevention
- Keep a single source of truth for type names; validate references on write
- Search for stale references after renaming or deleting types
When it happens
Trigger: An object type field's type points at a CustomTypeName that is not present in the resolved object types — e.g. a nested/self-referencing field whose target type was never defined or has a typo in its name.
Common situations: Defining a field referencing 'Address' without defining the 'Address' object type; renaming a type without updating referencing fields; partially applied metadata where a type definition was dropped.
Related errors
- the type {unknown_ndc_field_type_name:} is not defined as an
- the field {field_name:} in {type_name:} should have the type
- Recursive reference detected for object type '{type_name}' t
- The field '{field_name}' in object type '{type_name}' cannot
- field '{field_name:}' could not be found in field mappings f
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/c9fcb21ad3a66f8a.
Report an issue: GitHub.