hasura/graphql-engine · error · ArgumentMappingError

ndc validation error: {0}

Error message

ndc validation error: {0}

What it means

A wrapper (thiserror tuple variant) around NDCValidationError produced while validating command/field argument types against the data connector's schema. The Display text is 'ndc validation error: {0}', delegating the detail to the inner NDCValidationError such as NoSuchCollection, NoSuchArgument, NoSuchColumn, or NoSuchProcedure from helpers/ndc_validation.rs. It signals that metadata references an entity the connector's schema does not actually define.

Source

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

    ArgumentAlreadyPresetInDataConnectorLink {
        argument_name: ArgumentName,
        ndc_argument_name: DataConnectorArgumentName,
    },
    #[error("{argument_name:} has the data type {data_type:} that has not been defined")]
    UnknownType {
        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,

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Read the inner NDCValidationError message to identify the exact missing collection/argument/column/procedure
  2. Compare your metadata mappings against the connector's live schema (/schema endpoint)
  3. Update the metadata to reference the existing names, or fix the underlying database/connector so the entity exists
  4. Refresh any cached schema and re-validate
Defensive patterns

Strategy: try-catch

Validate before calling

// Validate entities against connector schema up front
let schema = connector.get_schema().await?;
assert!(schema.collections.iter().any(|c| c.name == collection_name));
assert!(schema.procedures.iter().any(|p| p.name == procedure_name));

Try / catch

match result {
    Err(Error::ArgumentError(e @ ArgumentError::NDCValidationError(_))) => {
        // inspect nested variant for precise messaging / retry after schema refresh
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling the argument resolution/validation path (metadata resolve, CLI build/validate, or startup) where a command or field mapped to a data connector references a collection, argument, column, or procedure absent from the connector's schema response.

Common situations: Connector schema drifted from metadata (renamed table/procedure/column); pointing metadata at a different database or connector instance; stale cached schema; connector bug returning incomplete schema.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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