hasura/graphql-engine · error · ArgumentMappingIssue

the following data connector arguments are not mapped to an

Error message

the following data connector arguments are not mapped to an argument: {}

What it means

ArgumentMappingIssue::UnmappedNdcArguments is raised when a data connector link (or command mapping) declares NDC-side arguments that are never mapped to any GraphQL/Hasura argument. The resolver requires every NDC argument the connector expects for a collection/command to be bound to an argument or a preset; leftovers trigger this error listing them.

Source

Thrown at v3/crates/metadata-resolve/src/helpers/argument.rs:79

        argument_name: ArgumentName,
        data_type: Qualified<CustomTypeName>,
    },
    #[error(
        "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:}"
    )]
    UnknownNdcType {
        argument_name: ArgumentName,
        ndc_argument_name: DataConnectorArgumentName,
        type_name: Qualified<CustomTypeName>,
        unknown_ndc_type: String,
    },
    #[error("ndc validation error: {0}")]
    NDCValidationError(NDCValidationError),
}

#[derive(Debug, thiserror::Error)]
pub enum ArgumentMappingIssue {
    #[error(
        "the following data connector arguments are not mapped to an argument: {}",
        ndc_argument_names.join(", ")
    )]
    UnmappedNdcArguments {
        ndc_argument_names: Vec<DataConnectorArgumentName>,
    },
    #[error(
        "the type of argument '{argument_name:}' is not compatible with the type of the data connector argument '{ndc_argument_name:}': {issue:}"
    )]
    IncompatibleType {
        argument_name: ArgumentName,
        ndc_argument_name: DataConnectorArgumentName,
        issue: type_validation::TypeCompatibilityIssue,
    },
}

impl ShouldBeAnError for ArgumentMappingIssue {
    fn should_be_an_error(&self, flags: &open_dds::flags::OpenDdFlags) -> bool {

View on GitHub (pinned to 724551b9ae)

Solutions

  1. For each listed NDC argument, either add a corresponding argument mapping or add an argument preset in the DataConnectorLink
  2. If the NDC argument is not needed, preset it to a constant value so it is considered mapped
  3. If the connector made the argument optional, upgrade/downgrade the connector schema so it is no longer required
  4. Re-run validation to confirm no unmapped NDC arguments remain

Example fix

// before
// DataConnectorLink has no presets; NDC arguments [tenant_id] unmapped
// after
"argument_presets": { "tenant_id": { "value": { "literal": "global" } } }
Defensive patterns

Strategy: validation

Validate before calling

let ndc_args: HashSet<_> = connector_schema_args_for(collection).collect();
let mapped: HashSet<_> = mappings.iter().map(|m| m.ndc_argument_name.clone())
    .chain(presets.keys().cloned()).collect();
let unmapped: Vec<_> = ndc_args.difference(&mapped).collect();
assert!(unmapped.is_empty(), "unmapped NDC arguments: {unmapped:?}");

Try / catch

On UnmappedNdcArguments, present the list of unmapped argument names to prompt for presets or mappings.

Prevention

When it happens

Trigger: A command or model mapped to a data connector where the connector's schema declares arguments (e.g. required collection arguments) that have neither an equivalent argument mapping nor an argument preset in the DataConnectorLink; removing an argument mapping without adding a preset; connector adds new required arguments after an upgrade.

Common situations: Upgrading a connector that introduces new required NDC arguments; deleting an argument from a command but forgetting to preset it; partial hand-edit of argument mappings in metadata.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/51a5fe4b10ff2688. Report an issue: GitHub.