hasura/graphql-engine · error · TypeMappingValidationError

the type {unknown_ndc_field_type_name:} is not defined as an

Error message

the type {unknown_ndc_field_type_name:} is not defined as an object type in the connector's schema. This type is referenced by the field {ndc_field_name:} in the connector's schema type {ndc_type_name:}, which is mapped to the field {field_name:} in the type {type_name:}

What it means

A field mapping references an NDC field whose type is itself an object type name that is not defined in the connector's schema. Unlike the top-level UnknownNdcType, this occurs one level down: while resolving the field 'ndc_field_name' on NDC type 'ndc_type_name' (mapped to field 'field_name' on custom type 'type_name'), the field's referenced type 'unknown_ndc_field_type_name' could not be found.

Source

Thrown at v3/crates/metadata-resolve/src/stages/object_types/error.rs:129

    },
    #[error(
        "could not find mappings for {object_type_name:} to the {data_connector_object_type:} on data connector {data_connector_name:}"
    )]
    DataConnectorTypeMappingNotFound {
        object_type_name: Qualified<CustomTypeName>,
        data_connector_name: Qualified<DataConnectorName>,
        data_connector_object_type: DataConnectorObjectType,
    },
    #[error(
        "the type {unknown_ndc_type:} is not defined as an object type in the connector's schema. This type is being mapped to by the type {type_name:}"
    )]
    UnknownNdcType {
        type_name: Qualified<CustomTypeName>,
        unknown_ndc_type: DataConnectorObjectType,
    },
    #[error("expected to find a predicate type for argument {argument_name:} but did not")]
    PredicateTypeNotFound { argument_name: ArgumentName },
    #[error(
        "the type {unknown_ndc_field_type_name:} is not defined as an object type in the connector's schema. This type is referenced by the field {ndc_field_name:} in the connector's schema type {ndc_type_name:}, which is mapped to the field {field_name:} in the type {type_name:}"
    )]
    UnknownNdcFieldObjectType {
        type_name: Qualified<CustomTypeName>,
        field_name: FieldName,
        ndc_type_name: String,
        ndc_field_name: String,
        unknown_ndc_field_type_name: String,
    },
    #[error("ndc validation error: {0}")]
    NDCValidationError(#[from] NDCValidationError),
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Inspect the connector's schema for the field's declared type and correct the field mapping in metadata
  2. If the referenced table/type was renamed in the connector, update nested mappings to the new name
  3. Re-track the missing table/type in the connector if it was accidentally removed
Defensive patterns

Strategy: validation

Validate before calling

// Validate nested field types exist in connector schema
const t = ndcSchema.object_types[ndcTypeName];
for (const f of fields) {
  const ft = t.fields[f.ndc_field_name]?.type;
  if (isNamedObjectType(ft) && !(ft.name in ndcSchema.object_types)) throw new Error(`Unknown nested type ${ft.name}`);
}

Prevention

When it happens

Trigger: A field in a mapped object type has an NDC type that names an object type absent from the connector's schema — e.g. a relationship/nested object field whose target table is no longer tracked or was renamed in the connector.

Common situations: Renaming or untracking a table in the connector while metadata still references its old name through a nested field; stale metadata after connector schema evolution; typos in nested field type mappings.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/e093d50997d525e1. Report an issue: GitHub.