{"record":{"id":"cdbb4b5446f78d90","repo":"hasura/graphql-engine","slug":"object-type-type-name-not-found","errorCode":null,"errorMessage":"Object type '{type_name}' not found","messagePattern":"Object type '(.+?)' not found","errorType":"exception","errorClass":"InternalDeveloperError","httpStatus":null,"severity":"error","filePath":"v3/crates/graphql/ir/src/error.rs","lineNumber":200,"sourceCode":"    #[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),\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,","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/graphql/ir/src/error.rs#L182-L218","documentation":"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.","triggerScenarios":"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.","commonSituations":"Deleting a model but leaving relationships pointing at it; partially applied migrations; metadata applied out of order so dependent types are missing.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const t = schema.getType('OldType');\nif (!t) throw new Error('type removed from schema');","typeGuard":"const typeExists = (schema, name) => !!schema.getType(name);","tryCatchPattern":"// Catch and check message for \"Object type ... not found\", then prompt metadata refresh","preventionTips":["Remove references to deleted types in relationships","Apply metadata atomically","Lint metadata for dangling type references"],"tags":["graphql","type-not-found","metadata"],"backgroundTag":"schema-type-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}