{"record":{"id":"55c565ee5604261b","repo":"hasura/graphql-engine","slug":"no-field-definition-found-for-field-field-name","errorCode":null,"errorMessage":"no field definition found for field '{field_name}' of object type '{object_type_name}'","messagePattern":"no field definition found for field '(.+?)' of object type '(.+?)'","errorType":"error_code","errorClass":"ArgumentPresetExecutionError","httpStatus":null,"severity":"error","filePath":"v3/crates/plan/src/query/arguments.rs","lineNumber":407,"sourceCode":"    #[error(\"command permissions for command {command_name} not found for role {role}\")]\n    CommandArgumentPresetsNotFound {\n        command_name: Qualified<CommandName>,\n        role: Role,\n    },\n    #[error(\"argument mapping not found for {argument_name}\")]\n    ArgumentMappingNotFound { argument_name: ArgumentName },\n    #[error(\"type mapping not found for object {object_type_name}\")]\n    TypeMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"no data connector field mapping found for field '{field_name}' of object type '{object_type_name}'\"\n    )]\n    FieldMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n    #[error(\n        \"no field definition found for field '{field_name}' of object type '{object_type_name}'\"\n    )]\n    FieldDefinitionNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n    #[error(\n        \"no data connector field mapping found for field '{field_name}' of object type '{object_type_name}'\"\n    )]\n    DataConnectorFieldMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n    #[error(\"{0}\")]\n    MapFieldNamesError(#[from] MapFieldNamesError),\n}\n\nimpl TraceableError for ArgumentPresetExecutionError {","sourceCodeStart":389,"sourceCodeEnd":425,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plan/src/query/arguments.rs#L389-L425","documentation":"FieldDefinitionNotFound is thrown when the planner looks up the definition of a field on an object type and the field does not exist at all. Unlike FieldMappingNotFound (field exists but has no connector mapping), this error means the field name is not present in the type's field definitions.","triggerScenarios":"Planning references a field that is not defined on the object type — e.g. a query selects a field that was removed, or an argument preset references a field name with a typo or the wrong casing.","commonSituations":"Schema evolution where a field was renamed or removed but clients still request it; copy-paste of queries between types; casing mismatches between GraphQL field names and metadata keys.","solutions":["Check that the named field actually exists in the field definitions of the named object type","Fix typos/casing in the requesting query or preset","Update clients after a field rename/removal","Regenerate the schema-facing types from current metadata"],"exampleFix":"// before\nquery { users { emails } }\n// after\nquery { users { email } }","handlingStrategy":"type-guard","validationCode":"fn field_is_defined(metadata: &Metadata, t: &Qualified<CustomTypeName>, f: &FieldName) -> bool {\n    metadata.object_types.get(t)\n        .map(|o| o.fields.contains_key(f)).unwrap_or(false)\n}","typeGuard":"fn is_field_definition_not_found(e: &ArgumentPresetExecutionError) -> bool {\n    matches!(e, ArgumentPresetExecutionError::FieldDefinitionNotFound { .. })\n}","tryCatchPattern":"match result {\n    Err(PlanError::Arguments(ArgumentPresetExecutionError::FieldDefinitionNotFound { object_type_name, field_name })) => {\n        bad_request(format!(\"unknown field {field_name} on {object_type_name}\"));\n    }\n    other => other,\n}","preventionTips":["Validate incoming selection sets against the current schema before planning","Publish schema changes and version clients so removed fields fail loudly","Use code-generated typed clients instead of hand-written field names"],"tags":["rust","schema","field-not-found","plan"],"backgroundTag":"schema-field-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}