{"record":{"id":"c9fcb21ad3a66f8a","repo":"hasura/graphql-engine","slug":"field-type-field-type-could-not-be-found-in-fiel","errorCode":null,"errorMessage":"Field type {field_type} could not be found in field {field_name} for object type {object_type_name}","messagePattern":"Field type (.+?) could not be found in field (.+?) for object type (.+?)","errorType":"validation","errorClass":"ObjectTypesIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/object_types/types.rs","lineNumber":476,"sourceCode":"    #[error(\n        \"Multiple {function_name} extraction functions found for type {scalar_type} in data connector {data_connector_name}\"\n    )]\n    DuplicateExtractionFunctionsDefined {\n        scalar_type: ndc_models::ScalarTypeName,\n        function_name: String,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"the field {field_name:} in {type_name:} should have the type {expected:} for data connector {data_connector:} but the field has type {provided:}\"\n    )]\n    FieldTypeMismatch {\n        field_name: FieldName,\n        type_name: Qualified<CustomTypeName>,\n        data_connector: Qualified<DataConnectorName>,\n        expected: QualifiedTypeName,\n        provided: QualifiedTypeName,\n    },\n    #[error(\n        \"Field type {field_type} could not be found in field {field_name} for object type {object_type_name}\"\n    )]\n    FieldTypeNotFound {\n        field_type: Qualified<CustomTypeName>,\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n    #[error(\n        \"Recursive reference detected for object type '{type_name}' through non-null field path: {field_path}\"\n    )]\n    RecursiveObjectType {\n        type_name: Qualified<CustomTypeName>,\n        field_path: String,\n    },\n    #[error(\n        \"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}\"\n    )]\n    FieldTypeNdcMappingIssue {","sourceCodeStart":458,"sourceCodeEnd":494,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/object_types/types.rs#L458-L494","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Ensure every referenced field type is defined\nconst defined = new Set(objectTypeNames);\nfor (const t of objectTypes) for (const f of t.fields) {\n  if (isCustomType(f.type) && !defined.has(baseTypeName(f.type))) throw new Error(`Undefined type ${f.type} for field ${f.name}`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep a single source of truth for type names; validate references on write","Search for stale references after renaming or deleting types"],"tags":["hasura","metadata","object-types","missing-type","field-mapping"],"backgroundTag":"missing-type-definition","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}