{"record":{"id":"895eeb7f59d0f1ed","repo":"hasura/graphql-engine","slug":"the-type-of-argument-argument-name-is-not-com","errorCode":null,"errorMessage":"the type of argument '{argument_name:}' is not compatible with the type of the data connector argument '{ndc_argument_name:}': {issue:}","messagePattern":"the type of argument '(.+?)' is not compatible with the type of the data connector argument '(.+?)': (.+?)","errorType":"validation","errorClass":"ArgumentMappingIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/argument.rs","lineNumber":86,"sourceCode":"        argument_name: ArgumentName,\n        ndc_argument_name: DataConnectorArgumentName,\n        type_name: Qualified<CustomTypeName>,\n        unknown_ndc_type: String,\n    },\n    #[error(\"ndc validation error: {0}\")]\n    NDCValidationError(NDCValidationError),\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum ArgumentMappingIssue {\n    #[error(\n        \"the following data connector arguments are not mapped to an argument: {}\",\n        ndc_argument_names.join(\", \")\n    )]\n    UnmappedNdcArguments {\n        ndc_argument_names: Vec<DataConnectorArgumentName>,\n    },\n    #[error(\n        \"the type of argument '{argument_name:}' is not compatible with the type of the data connector argument '{ndc_argument_name:}': {issue:}\"\n    )]\n    IncompatibleType {\n        argument_name: ArgumentName,\n        ndc_argument_name: DataConnectorArgumentName,\n        issue: type_validation::TypeCompatibilityIssue,\n    },\n}\n\nimpl ShouldBeAnError for ArgumentMappingIssue {\n    fn should_be_an_error(&self, flags: &open_dds::flags::OpenDdFlags) -> bool {\n        match self {\n            ArgumentMappingIssue::UnmappedNdcArguments { .. } => false,\n            ArgumentMappingIssue::IncompatibleType { .. } => {\n                flags.contains(open_dds::flags::Flag::ValidateArgumentMappingTypes)\n            }\n        }\n    }","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/argument.rs#L68-L104","documentation":"ArgumentMappingIssue::IncompatibleType reports that an argument mapped to a data connector argument has a type that fails type_validation compatibility checking (type_validation::TypeCompatibilityIssue). Even though both types exist, they cannot be coerced between the metadata-side argument type and the NDC argument type (e.g. comparing an object type against a scalar, or an enum with mismatched values).","triggerScenarios":"An ArgumentToDataConnectorArgumentMapping where the argument's Hasura type and the NDC argument's declared type fail the compatibility rules in type_validation (object vs scalar, mismatched scalar representation, incompatible nullable/array wrappers); changing an argument's type after the mapping was created; connector changing an argument from scalar to object type.","commonSituations":"Type drift between metadata and connector schema; mapping a new object-typed argument to what is actually a scalar NDC argument; connector version upgrades that alter argument types.","solutions":["Inspect the nested {issue} detail from type_validation to see which part of the types clashed","Change the argument's type or the mapping so both sides agree (same scalar representation or a valid object-type mapping)","If the connector's type changed, update the mapping or connector version so types align","Add/adjust an intermediate type mapping so the custom type maps to the correct NDC type"],"exampleFix":"// before\n// argument \"limit\" typed as custom object type mapped to NDC scalar Int\n// after\n// argument \"limit\" typed as built-in Integer mapped to NDC scalar Int","handlingStrategy":"type-guard","validationCode":"for m in argument_mappings {\n    type_validation::check_compatibility(&arg_type, &ndc_type)\n        .map_err(|issue| format!(\"{} vs {}: {issue}\", m.argument_name, m.ndc_argument_name))?;\n}","typeGuard":"fn types_compatible(a: &TypeReference, b: &NdcType) -> bool {\n    type_validation::check_compatibility(a, b).is_ok()\n}","tryCatchPattern":"Catch IncompatibleType and use the nested TypeCompatibilityIssue to tell the user exactly which sub-check failed (scalar representation, nullability, etc.).","preventionTips":["Lock connector versions to avoid silent type changes","Add a CI check comparing argument types against the connector schema","When changing an argument's type, audit its NDC mappings in the same PR"],"tags":["type-compatibility","argument-mapping","ndc","data-connectors"],"backgroundTag":"type-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}