{"record":{"id":"d5c06cb6e9dc20e5","repo":"hasura/graphql-engine","slug":"type-opendd-type-is-not-compatible-with-ndc-t","errorCode":null,"errorMessage":"Type '{opendd_type:}' is not compatible with NDC type '{}' - {issue_message:}","messagePattern":"Type '(.+?)' is not compatible with NDC type '(.+?)' - (.+?)","errorType":"validation","errorClass":"TypeCompatibilityIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/type_validation.rs","lineNumber":6,"sourceCode":"use crate::stages::data_connector_scalar_types;\nuse crate::types::subgraph::{QualifiedBaseType, QualifiedTypeName, QualifiedTypeReference};\nuse ndc_models;\n\n#[derive(Debug, thiserror::Error)]\n#[error(\n    \"Type '{opendd_type:}' is not compatible with NDC type '{}' - {issue_message:}\",\n    show_ndc_type(ndc_type)\n)]\npub struct TypeCompatibilityIssue {\n    opendd_type: QualifiedTypeReference,\n    ndc_type: ndc_models::Type,\n    issue_message: String,\n}\n\n/// Validate OpenDd type compatibility with NDC type\npub fn validate_type_compatibility(\n    data_connector_scalars: &data_connector_scalar_types::DataConnectorScalars,\n    opendd_type: &QualifiedTypeReference,\n    ndc_type: &ndc_models::Type,\n) -> Option<TypeCompatibilityIssue> {\n    validate_type_structure(\n        data_connector_scalars,\n        &opendd_type.underlying_type,","sourceCodeStart":1,"sourceCodeEnd":24,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/type_validation.rs#L1-L24","documentation":"A type used in metadata is not compatible with the NDC type it is being compared against, with an issue message explaining why (e.g. incompatible nullability, collection/table vs scalar mismatch, unsupported type). Raised when checking type compatibility between OpenDD type references and NDC types.","triggerScenarios":"Nullability mismatches (nullable metadata type vs non-null NDC type or vice versa); scalar/collection shape mismatch; using a type the connector does not support in that position.","commonSituations":"Database schema changes altering nullability; connector versions representing types differently; hand-authored mappings with wrong nullability suffixes.","solutions":["Read the issue_message to identify the exact incompatibility and adjust the metadata type (nullability, scalar name, or shape) to match the NDC type","Alter the underlying column/type in the database if the metadata is authoritative","Refresh the connector schema and reconcile the metadata with the reported types"],"exampleFix":"# before\nfield: { column: email, type: String! }  # NDC type is nullable\n# after\nfield: { column: email, type: String }","handlingStrategy":"validation","validationCode":"fn compatible(opendd: &QualifiedTypeReference, ndc: &ndc_models::Type) -> bool {\n    // check nullability and kind align before resolving metadata\n    true\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Mirror DB nullability and types in metadata; re-resolve after migrations"],"tags":["type-compatibility","ndc","nullability"],"backgroundTag":"type-compatibility-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}