{"record":{"id":"5ef9e282d943f134","repo":"hasura/graphql-engine","slug":"the-field-field-name-was-not-found-on-object-t","errorCode":null,"errorMessage":"The field '{field_name}' was not found on object type '{object_type_name}'","messagePattern":"The field '(.+?)' was not found on object type '(.+?)'","errorType":"exception","errorClass":"InternalDeveloperError","httpStatus":null,"severity":"error","filePath":"v3/crates/graphql/ir/src/error.rs","lineNumber":205,"sourceCode":"\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),\n\n    #[error(\n        \"Argument mapping not found for the argument {argument_name:} while executing the relationship {relationship_name:}\"\n    )]\n    ArgumentMappingNotFoundForRelationship {\n        relationship_name: RelationshipName,\n        argument_name: ArgumentName,\n    },\n\n    #[error(\n        \"The aggregation function {aggregation_function} operating over the {aggregate_operand_type} type is missing a data connector mapping for {data_connector_name}\"","sourceCodeStart":187,"sourceCodeEnd":223,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/graphql/ir/src/error.rs#L187-L223","documentation":"Raised when looking up field_name on object type object_type_name fails during IR planning. Unlike 660 this is a pure type-level lookup: the field simply is not a member of that object type's definition.","triggerScenarios":"Selecting a subfield on an object-typed field where the subfield is not defined on that object type; ordering-by or filtering on a nonexistent field of an object type; relationship target field mismatches.","commonSituations":"Schema changed and clients (persisted queries, codegen output) are stale; typos in field names; union/interface misuse where the field belongs to another type.","solutions":["Correct the field name in the query to one that exists on the object type","Regenerate client code / persisted queries after schema changes","Validate the query against the current schema before sending it"],"exampleFix":"# before\nquery { users { address { zip } } }  # 'zip' does not exist on Address\n# after\nquery { users { address { postalCode } } }","handlingStrategy":"validation","validationCode":"// Validate query against schema before sending (graphql-js)\nimport { validate } from 'graphql';\nconst errs = validate(schema, parse(queryStr));\nif (errs.length) throw errs[0];","typeGuard":"const fieldOnType = (schema, typeName, fieldName) =>\n  !!schema.getType(typeName)?.getFields()?.[fieldName];","tryCatchPattern":"// Rely on pre-send validation; treat this error as a stale-client signal and regenerate codegen output","preventionTips":["Run codegen after every schema change","Use persisted-query versioning","Validate queries in CI against the latest schema"],"tags":["graphql","field-not-found","validation"],"backgroundTag":"graphql-field-not-on-type","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}