{"record":{"id":"489adf3f9154d291","repo":"hasura/graphql-engine","slug":"missing-mapping-for-field-field-name-when-mappi","errorCode":null,"errorMessage":"Missing mapping for field {field_name:} when mapping type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}","messagePattern":"Missing mapping for field (.+?) when mapping type (.+?) to object (.+?) of data connector (.+?)","errorType":"validation","errorClass":"TypeMappingCollectionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/type_mappings.rs","lineNumber":35,"sourceCode":"#[derive(thiserror::Error, Debug)]\npub enum TypeMappingCollectionError {\n    #[error(\n        \"No mapping defined for type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}\"\n    )]\n    MappingNotDefined {\n        type_name: Qualified<CustomTypeName>,\n        data_connector: Qualified<DataConnectorName>,\n        ndc_type_name: DataConnectorObjectType,\n    },\n    #[error(\n        \"No support for using the same type {type_name:} against multiple data connector objects {ndc_type_1:} and {ndc_type_2:}\"\n    )]\n    MappingToMultipleDataConnectorObjectType {\n        type_name: Qualified<CustomTypeName>,\n        ndc_type_1: DataConnectorObjectType,\n        ndc_type_2: DataConnectorObjectType,\n    },\n    #[error(\n        \"Missing mapping for field {field_name:} when mapping type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}\"\n    )]\n    MissingFieldMapping {\n        type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n        data_connector: Qualified<DataConnectorName>,\n        ndc_type_name: DataConnectorObjectType,\n    },\n\n    #[error(\"Cannot return a predicate type from a command\")]\n    PredicateAsResponseType,\n\n    #[error(\"Internal Error: Unknown type {type_name:} when collecting type mappings\")]\n    InternalUnknownType {\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\"ndc validation error: {0}\")]\n    NDCValidationError(#[from] NDCValidationError),","sourceCodeStart":17,"sourceCodeEnd":53,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/type_mappings.rs#L17-L53","documentation":"A field declared on the custom type has no field mapping when mapping the type to the connector object. Every field of a mapped type must have a corresponding field mapping to the object's fields.","triggerScenarios":"Adding a field to an ObjectType without adding its entry in the type's field mappings; renaming a mapped field on one side only.","commonSituations":"Incremental edits to type definitions; generation scripts emitting partial mappings; field renames.","solutions":["Add the missing field mapping entry for the named field","If the field should not be exposed, remove it from the type definition","Ensure field names in mappings match the ObjectType declarations"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"for f in type_def.fields {\n    assert!(mapping.field_mappings.contains_key(&f.name));\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Codegen mappings from type definitions to keep them complete"],"tags":["type-mapping","field-mapping","ndc"],"backgroundTag":"missing-field-mapping","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}