{"record":{"id":"81bdac8247bd1fdc","repo":"hasura/graphql-engine","slug":"field-mapping-not-found-for-the-field-field-name","errorCode":null,"errorMessage":"Field mapping not found for the field {field_name:} of type {type_name:}","messagePattern":"Field mapping not found for the field (.+?) of type (.+?)","errorType":"exception","errorClass":"InternalDeveloperError","httpStatus":null,"severity":"error","filePath":"v3/crates/graphql/ir/src/error.rs","lineNumber":194,"sourceCode":"    #[error(\"No function/procedure specified for command field {field_name} of type {type_name}\")]\n    NoFunctionOrProcedure {\n        type_name: ast::TypeName,\n        field_name: ast::Name,\n    },\n\n    #[error(\"No argument source specified for argument {argument_name} of field {field_name}\")]\n    NoArgumentSource {\n        field_name: ast::Name,\n        argument_name: ast::Name,\n    },\n\n    #[error(\"Mapping for the {mapping_kind} typename {type_name:} not found\")]\n    TypenameMappingNotFound {\n        type_name: ast::TypeName,\n        mapping_kind: &'static str,\n    },\n\n    #[error(\"Field mapping not found for the field {field_name:} of type {type_name:}\")]\n    FieldMappingNotFound {\n        type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n\n    #[error(\"Object type '{type_name}' not found\")]\n    ObjectTypeNotFound {\n        type_name: Qualified<CustomTypeName>,\n    },\n\n    #[error(\"The field '{field_name}' was not found on object type '{object_type_name}'\")]\n    ObjectTypeFieldNotFound {\n        field_name: FieldName,\n        object_type_name: Qualified<CustomTypeName>,\n    },\n\n    #[error(\"{0}\")]\n    RelationshipFieldMappingError(#[from] plan::RelationshipFieldMappingError),","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/graphql/ir/src/error.rs#L176-L212","documentation":"Thrown during GraphQL-to-IR translation when a field selected in the query has no corresponding mapping in the NDC/connector field mapping for its type. The IR builder walks the selection set against the type's mapped fields and fails to find field_name on type_name. It almost always indicates a mismatch between the GraphQL schema and the underlying data connector metadata.","triggerScenarios":"Selecting a field in a query that exists in the GraphQL schema but is missing from the data connector mapping for that object type; using a stale/misordered metadata after a schema change; relationships referencing fields that were renamed without updating mappings.","commonSituations":"Adding a field to a model but not regenerating/pushing connector metadata; renaming a column while the GraphQL schema still exposes the old field name; version drift between the CLI that generated metadata and the engine version resolving the query.","solutions":["Regenerate or update the data connector metadata so every exposed field has a mapping","Verify the field name in the query matches the current schema (no stale persisted queries/clients)","Check that relationships and nested selections only reference mapped fields","Rebuild/redeploy so schema and metadata versions are in sync"],"exampleFix":"# before\nquery { users { nickname } }  # column renamed to handle\n# after\nquery { users { handle } }","handlingStrategy":"validation","validationCode":"// Before executing, check the field exists on the type in the fetched schema\nconst fields = schema.getType('user').getFields();\nif (!fields['nickname']) throw new Error('field missing on type');","typeGuard":"const isKnownField = (schema, typeName, f) =>\n  !!schema.getType(typeName)?.getFields()?.[f];","tryCatchPattern":"// Match on the IR error message containing 'Field mapping not found' and surface a schema/metadata drift hint","preventionTips":["Regenerate connector metadata whenever the model changes","Validate selections against the current schema before sending","Keep engine and metadata versions in sync"],"tags":["graphql","metadata","field-mapping","ir"],"backgroundTag":"schema-field-mapping-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}