{"record":{"id":"e093d50997d525e1","repo":"hasura/graphql-engine","slug":"the-type-unknown-ndc-field-type-name-is-not-def","errorCode":null,"errorMessage":"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:}","messagePattern":"the type (.+?) is not defined as an object type in the connector's schema\\. This type is referenced by the field (.+?) in the connector's schema type (.+?), which is mapped to the field (.+?) in the type (.+?)","errorType":"validation","errorClass":"TypeMappingValidationError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/object_types/error.rs","lineNumber":129,"sourceCode":"    },\n    #[error(\n        \"could not find mappings for {object_type_name:} to the {data_connector_object_type:} on data connector {data_connector_name:}\"\n    )]\n    DataConnectorTypeMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        data_connector_name: Qualified<DataConnectorName>,\n        data_connector_object_type: DataConnectorObjectType,\n    },\n    #[error(\n        \"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:}\"\n    )]\n    UnknownNdcType {\n        type_name: Qualified<CustomTypeName>,\n        unknown_ndc_type: DataConnectorObjectType,\n    },\n    #[error(\"expected to find a predicate type for argument {argument_name:} but did not\")]\n    PredicateTypeNotFound { argument_name: ArgumentName },\n    #[error(\n        \"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:}\"\n    )]\n    UnknownNdcFieldObjectType {\n        type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n        ndc_type_name: String,\n        ndc_field_name: String,\n        unknown_ndc_field_type_name: String,\n    },\n    #[error(\"ndc validation error: {0}\")]\n    NDCValidationError(#[from] NDCValidationError),\n}\n","sourceCodeStart":111,"sourceCodeEnd":142,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/object_types/error.rs#L111-L142","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Inspect the connector's schema for the field's declared type and correct the field mapping in metadata","If the referenced table/type was renamed in the connector, update nested mappings to the new name","Re-track the missing table/type in the connector if it was accidentally removed"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate nested field types exist in connector schema\nconst t = ndcSchema.object_types[ndcTypeName];\nfor (const f of fields) {\n  const ft = t.fields[f.ndc_field_name]?.type;\n  if (isNamedObjectType(ft) && !(ft.name in ndcSchema.object_types)) throw new Error(`Unknown nested type ${ft.name}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After connector schema changes, re-run a metadata consistency check covering nested field types","Prefer tooling that regenerates full type mappings from the live schema"],"tags":["hasura","metadata","data-connectors","ndc","field-mapping"],"backgroundTag":"type-mapping-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}