{"record":{"id":"09d13b9a53b666a4","repo":"hasura/graphql-engine","slug":"argument-name-has-the-data-type-data-type-th","errorCode":null,"errorMessage":"{argument_name:} has the data type {data_type:} that has not been defined","messagePattern":"(.+?) has the data type (.+?) that has not been defined","errorType":"validation","errorClass":"ArgumentMappingError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/helpers/argument.rs","lineNumber":59,"sourceCode":"    #[error(\"argument {argument_name:} is mapped to an unknown argument {ndc_argument_name:}\")]\n    UnknownNdcArgument {\n        argument_name: ArgumentName,\n        ndc_argument_name: DataConnectorArgumentName,\n    },\n    #[error(\"the mapping for argument {argument_name:} has been defined more than once\")]\n    DuplicateCommandArgumentMapping { argument_name: ArgumentName },\n    #[error(\"the data connector argument {ndc_argument_name} has been mapped to more than once\")]\n    DuplicateNdcArgumentMapping {\n        ndc_argument_name: DataConnectorArgumentName,\n    },\n    #[error(\n        \"the argument {argument_name} is mapped to the data connector argument {ndc_argument_name} which is already used as an argument preset in the DataConnectorLink\"\n    )]\n    ArgumentAlreadyPresetInDataConnectorLink {\n        argument_name: ArgumentName,\n        ndc_argument_name: DataConnectorArgumentName,\n    },\n    #[error(\"{argument_name:} has the data type {data_type:} that has not been defined\")]\n    UnknownType {\n        argument_name: ArgumentName,\n        data_type: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"the type {unknown_ndc_type:} is not defined as an object type in the connector's schema. This type is being mapped to by the type {type_name:} used in argument {argument_name:} which is mapped to the data connector argument {ndc_argument_name:}\"\n    )]\n    UnknownNdcType {\n        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)]","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/helpers/argument.rs#L41-L77","documentation":"Thrown by metadata-resolve when an argument (on a command or object field mapped to a data connector) references a custom type via Qualified<CustomTypeName> that is not defined anywhere in the metadata's type definitions (scalar/object type maps). During resolution every argument type must resolve to a known type; if the Qualified reference has no corresponding entry, resolution fails with this error. It typically means the type was renamed, deleted, or lives in a different subgraph.","triggerScenarios":"An argument's type is set to a Qualified custom type name (e.g. \"other_subgraph.MyType\") that does not exist in the resolved subgraph/connector schema; building/resolving metadata that references a type removed in a refactor or provided by an extension that is not enabled; cross-subgraph type reference with wrong namespace prefix.","commonSituations":"Renaming a custom type without updating command argument types; referencing a type defined in another subgraph that isn't linked via a type prefix; metadata JSON/YAML hand-edited with a typo'd type name; upgrading a connector extension that no longer registers a type.","solutions":["Find the argument named in the error and check its declared type's namespace and name against the types defined in your metadata (or the extension that should provide it)","If the type was renamed or moved, update the argument's type reference to the correct Qualified name","If the type should come from another subgraph, verify the subgraph/extension is enabled and its types are exported","Define the missing custom type (scalar or object type) in metadata so the reference resolves"],"exampleFix":"// before\n{\n  \"name\": \"my_command\",\n  \"arguments\": { \"filter\": { \"type\": \"other_subgraph.MissingType\" } }\n}\n// after\n{\n  \"name\": \"my_command\",\n  \"arguments\": { \"filter\": { \"type\": \"other_subgraph.ExistingType\" } }\n}","handlingStrategy":"validation","validationCode":"let defined: HashSet<_> = metadata.types.keys().collect();\nfor (arg_name, arg) in &command.arguments {\n    if let Type::Qualified(q) = &arg.type_ref {\n        assert!(defined.contains(q), \"argument {arg_name} references undefined type {q}\");\n    }\n}","typeGuard":"fn type_is_defined(t: &Qualified<CustomTypeName>, types: &TypeMap) -> bool {\n    types.get(t).is_some()\n}","tryCatchPattern":"Match on the resolution error variant UnknownType and surface the argument_name and data_type to the user instead of a generic failure.","preventionTips":["Run metadata validation (CLI validate/build) in CI before deploy","Keep type renames scripted so all references update together","Use linters or grep for type references before deleting a type"],"tags":["metadata","type-resolution","hasura","data-connectors"],"backgroundTag":"unknown-type-reference","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}