{"record":{"id":"e843440cb185125a","repo":"hasura/graphql-engine","slug":"no-mapping-defined-for-type-type-name-to-object","errorCode":null,"errorMessage":"No mapping defined for type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}","messagePattern":"No mapping defined for type (.+?) to object (.+?) of data connector (.+?)","errorType":"validation","errorClass":"TypeMappingCollectionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/type_mappings.rs","lineNumber":19,"sourceCode":"use crate::stages::{object_types, scalar_types, type_permissions};\n\nuse crate::data_connectors::CommandsResponseConfig;\nuse crate::helpers::ndc_validation::{NDCValidationError, get_underlying_named_type};\nuse crate::helpers::types::{object_type_exists, unwrap_custom_type_name};\nuse crate::types::subgraph::Qualified;\nuse open_dds::data_connector::{DataConnectorName, DataConnectorObjectType};\nuse open_dds::types::{CustomTypeName, FieldName};\nuse std::collections::BTreeMap;\n\n#[derive(Debug)]\npub struct TypeMappingToCollect<'a> {\n    pub type_name: &'a Qualified<CustomTypeName>,\n    pub ndc_object_type_name: &'a ndc_models::TypeName,\n}\n\n#[derive(thiserror::Error, Debug)]\npub enum TypeMappingCollectionError {\n    #[error(\n        \"No mapping defined for type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}\"\n    )]\n    MappingNotDefined {\n        type_name: Qualified<CustomTypeName>,\n        data_connector: Qualified<DataConnectorName>,\n        ndc_type_name: DataConnectorObjectType,\n    },\n    #[error(\n        \"No support for using the same type {type_name:} against multiple data connector objects {ndc_type_1:} and {ndc_type_2:}\"\n    )]\n    MappingToMultipleDataConnectorObjectType {\n        type_name: Qualified<CustomTypeName>,\n        ndc_type_1: DataConnectorObjectType,\n        ndc_type_2: DataConnectorObjectType,\n    },\n    #[error(\n        \"Missing mapping for field {field_name:} when mapping type {type_name:} to object {ndc_type_name:} of data connector {data_connector:}\"\n    )]","sourceCodeStart":1,"sourceCodeEnd":37,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/type_mappings.rs#L1-L37","documentation":"No type mapping exists for a custom type to the given NDC object type of the data connector. Raised while collecting type mappings when a type is expected to map to an object but no mapping was found.","triggerScenarios":"A relationship/nested type resolves to an object usage on a connector with no mapping recorded; partially authored typeMappings.","commonSituations":"Adding nested object usages without mappings; refactoring type names without updating mappings; connector switch leaving old mappings only.","solutions":["Add the type mapping for the type to that data connector object","Verify type and data connector names (including subgraph qualification) are spelled exactly","Remove usages of the type if mapping is not intended"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"assert!(mappings.lookup(type_name, data_connector).is_some());","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Automate typeMappings generation instead of hand-authoring"],"tags":["type-mapping","ndc"],"backgroundTag":"missing-type-mapping","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}