{"record":{"id":"7ec7234c6c6a315f","repo":"hasura/graphql-engine","slug":"type-mapping-not-found-for-object-object-type-nam","errorCode":null,"errorMessage":"type mapping not found for object {object_type_name}","messagePattern":"type mapping not found for object (.+?)","errorType":"error_code","errorClass":"ArgumentPresetExecutionError","httpStatus":null,"severity":"error","filePath":"v3/crates/plan/src/query/arguments.rs","lineNumber":396,"sourceCode":"    #[error(\"Model source not found for model '{model_name}'\")]\n    ModelSourceNotFound { model_name: Qualified<ModelName> },\n    #[error(\"Model permissions for model {model_name} not found for role {role}\")]\n    ModelArgumentPresetsNotFound {\n        role: Role,\n        model_name: Qualified<ModelName>,\n    },\n    #[error(\"command {command_name} does not have a source defined\")]\n    CommandSourceNotFound {\n        command_name: Qualified<CommandName>,\n    },\n    #[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(","sourceCodeStart":378,"sourceCodeEnd":414,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plan/src/query/arguments.rs#L378-L414","documentation":"TypeMappingNotFound is thrown when the planner cannot find a type mapping for the named object type (Qualified<CustomTypeName>). Type mappings tell the planner how a custom object type maps to the data connector's type system; their absence makes argument/type coercion impossible for that object.","triggerScenarios":"Planning a query or preset involving an object type (e.g. an argument of a custom object type or a nested selection) whose Qualified<CustomTypeName> has no entry in the type mappings section of metadata.","commonSituations":"Defining a new object type without adding its type mapping; renaming a type in the schema without updating mappings; connector upgrades that introduce type changes requiring new mappings.","solutions":["Add a type mapping for the named object type in the object types section of metadata","Verify the type name and subgraph qualification match exactly","Regenerate mappings if the connector schema changed","Validate metadata before deploying"],"exampleFix":"// before\n{\"objectTypes\":{\"Address\":{}}}\n// after\n{\"objectTypes\":{\"Address\":{\"mapping\":{\"dataConnector\":\"pg\",\"type\":\"address\"}}}}","handlingStrategy":"validation","validationCode":"fn type_mapping_exists(metadata: &Metadata, t: &Qualified<CustomTypeName>) -> bool {\n    metadata.object_types.get(t).map(|o| o.mapping.is_some()).unwrap_or(false)\n}","typeGuard":"fn is_type_mapping_not_found(e: &ArgumentPresetExecutionError) -> bool {\n    matches!(e, ArgumentPresetExecutionError::TypeMappingNotFound { .. })\n}","tryCatchPattern":"match result {\n    Err(PlanError::Arguments(ArgumentPresetExecutionError::TypeMappingNotFound { object_type_name })) => {\n        bad_request(format!(\"no type mapping for {object_type_name}\"));\n    }\n    other => other,\n}","preventionTips":["Add type mappings in the same commit that adds object types","Write a metadata linter rule: every custom object type must have a mapping or be explicitly logical","Regenerate metadata after connector type changes"],"tags":["rust","type-mapping","metadata","plan"],"backgroundTag":"metadata-mapping-missing","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}