hasura/graphql-engine · error · InternalDeveloperError
Object type '{type_name}' not found
Error message
Object type '{type_name}' not found What it means
The IR translator needed the object type identified by type_name (a Qualified<CustomTypeName>) but it is absent from the type definitions in scope. This occurs when a selection or relationship refers to a type that the schema/metadata no longer defines, or was never registered.
Source
Thrown at v3/crates/graphql/ir/src/error.rs:200
#[error("No argument source specified for argument {argument_name} of field {field_name}")]
NoArgumentSource {
field_name: ast::Name,
argument_name: ast::Name,
},
#[error("Mapping for the {mapping_kind} typename {type_name:} not found")]
TypenameMappingNotFound {
type_name: ast::TypeName,
mapping_kind: &'static str,
},
#[error("Field mapping not found for the field {field_name:} of type {type_name:}")]
FieldMappingNotFound {
type_name: Qualified<CustomTypeName>,
field_name: FieldName,
},
#[error("Object type '{type_name}' not found")]
ObjectTypeNotFound {
type_name: Qualified<CustomTypeName>,
},
#[error("The field '{field_name}' was not found on object type '{object_type_name}'")]
ObjectTypeFieldNotFound {
field_name: FieldName,
object_type_name: Qualified<CustomTypeName>,
},
#[error("{0}")]
RelationshipFieldMappingError(#[from] plan::RelationshipFieldMappingError),
#[error(
"Argument mapping not found for the argument {argument_name:} while executing the relationship {relationship_name:}"
)]
ArgumentMappingNotFoundForRelationship {
relationship_name: RelationshipName,View on GitHub (pinned to 724551b9ae)
Solutions
- Confirm the type still exists in your metadata/schema and re-apply metadata
- Fix relationships or fields that reference the deleted type
- Track the missing type (e.g. track it in the CLI) so it appears in the type map
- Redeploy so all metadata is applied atomically
Defensive patterns
Strategy: validation
Validate before calling
const t = schema.getType('OldType');
if (!t) throw new Error('type removed from schema'); Type guard
const typeExists = (schema, name) => !!schema.getType(name);
Try / catch
// Catch and check message for "Object type ... not found", then prompt metadata refresh
Prevention
- Remove references to deleted types in relationships
- Apply metadata atomically
- Lint metadata for dangling type references
When it happens
Trigger: Querying a nested object type that was removed from the metadata; a relationship argument whose target type is not in the current type map; referencing a command/model return type that is not tracked.
Common situations: Deleting a model but leaving relationships pointing at it; partially applied migrations; metadata applied out of order so dependent types are missing.
Related errors
- error fetching server config: %v
- Field mapping not found for the field {field_name:} of type
- Argument mapping not found for the argument {argument_name:}
- Cannot add query root field {0} as it already in use
- Cannot add mutation root field {0} as it already in use
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/cdbb4b5446f78d90.
Report an issue: GitHub.