{"record":{"id":"0169557950b70fdd","repo":"hasura/graphql-engine","slug":"type-mappings-not-found-for-object-type-object-ty","errorCode":null,"errorMessage":"Type mappings not found for object type {object_type_name}","messagePattern":"Type mappings not found for object type (.+?)","errorType":"error_code","errorClass":"MapFieldNamesError","httpStatus":null,"severity":"error","filePath":"v3/crates/plan/src/query/arguments.rs","lineNumber":653,"sourceCode":"            },\n        };\n        resolved_arguments.insert(argument_name, resolved_argument_value.clone());\n    }\n\n    Ok(resolved_arguments)\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum MapFieldNamesError {\n    #[error(\"Value did not match array type, was expecting {expected_type}\")]\n    ExpectedAnArray {\n        expected_type: QualifiedTypeReference,\n    },\n    #[error(\"Value did not match object type, was expecting {expected_type}\")]\n    ExpectedAnObject {\n        expected_type: QualifiedTypeReference,\n    },\n    #[error(\"Type mappings not found for object type {object_type_name}\")]\n    TypeMappingsNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\"Field mapping {field_name} not found for object type {object_type_name}\")]\n    FieldMappingNotFound {\n        object_type_name: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n    #[error(\"Unknown fields found in object type {object_type_name}: {fields:?}\")]\n    UnknownFieldsInObject {\n        object_type_name: Qualified<CustomTypeName>,\n        fields: Vec<String>,\n    },\n}\n\nimpl TraceableError for MapFieldNamesError {\n    fn visibility(&self) -> ErrorVisibility {\n        match self {","sourceCodeStart":635,"sourceCodeEnd":671,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/plan/src/query/arguments.rs#L635-L671","documentation":"MapFieldNamesError::TypeMappingsNotFound means the planner found a value typed as a given object type (Qualified<CustomTypeName>) but the underlying data connector's schema has no type mapping registered for that type name. Field-name mapping cannot proceed because there is no mapping table for the object at all.","triggerScenarios":"Using an object type in an argument whose CustomTypeName is not present in the data source's schema.type_mappings — e.g. an object type defined only in metadata but not in the referenced NDC source, or a typo'd/renamed type name.","commonSituations":"Renaming an object type in metadata without regenerating/reloading the connector schema; referencing a type from a different data source; a stale Hasura metadata snapshot after the connector schema changed; bugs in codegen producing type names that don't match the source.","solutions":["Verify the object type name exists in the data source's type_mappings (check /capabilities or the connector schema)","Reload/track the source so metadata type mappings are refreshed","Fix the metadata or codegen so the type name exactly matches the connector's schema","If the type lives in another source, reference that source instead"],"exampleFix":"// before\n{ \"type_mappings\": { \"User\": {...} } }  // argument uses type \"Users\"\n// after\n{ \"type_mappings\": { \"User\": {...}, \"Users\": {...} } }  // names aligned","handlingStrategy":"validation","validationCode":"// Before planning, confirm the type is mapped\nlet type_names: HashSet<_> = schema.type_mappings.keys().collect();\nassert!(type_names.contains(&object_type_name), \"type {object_type_name} missing from type_mappings\");","typeGuard":"fn has_type_mapping(schema: &Schema, name: &Qualified<CustomTypeName>) -> bool { schema.type_mappings.contains_key(name) }","tryCatchPattern":"Degrade gracefully: catch TypeMappingsNotFound and report a configuration error naming the object type and source.","preventionTips":["Run metadata consistency checks after schema changes","Automate type mapping generation from the connector schema","Add CI validation that every tracked object type has a type mapping"],"tags":["rust","ndc","metadata","type-mapping","schema-mismatch"],"backgroundTag":"schema-validation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}