hasura/graphql-engine · error · NDCValidationError

Unsupported type representation {representation:} in scalar

Error message

Unsupported type representation {representation:} in scalar type {scalar_type:}, for argument preset name {argument_name:}. Only 'json' representation is supported.

What it means

DataConnectorLink.argumentPresets only supports the 'json' type representation. If the scalar type used by an argument preset declares a different representation, resolution fails with this error listing the offending representation and argument.

Source

Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:137

        function_or_procedure_name: String,
        function_or_procedure_output_type: String,
        command_name: String,
        command_output_type: String,
    },
    #[error(
        "Custom result type of function {function_or_procedure_name:} does not match custom output type of command: {command_name:}"
    )]
    FuncProcAndCommandCustomOutputTypeMismatch {
        function_or_procedure_name: String,
        command_name: String,
    },
    #[error("data connector does not support queries")]
    QueryCapabilityUnsupported,
    #[error("data connector does not support mutations")]
    MutationCapabilityUnsupported,

    // for `DataConnectorLink.argumentPresets` not all type representations are supported.
    #[error(
        "Unsupported type representation {representation:} in scalar type {scalar_type:}, for argument preset name {argument_name:}. Only 'json' representation is supported."
    )]
    UnsupportedTypeInDataConnectorLinkArgumentPreset {
        representation: String,
        scalar_type: DataConnectorScalarType,
        argument_name: open_dds::types::DataConnectorArgumentName,
    },

    #[error(
        "Argument '{argument_name:}' used in argument mapping for the field '{field_name:}' in object type '{object_type_name:}' is not defined in the data connector '{data_connector_name:}'."
    )]
    NoSuchArgumentInNDCArgumentMapping {
        argument_name: open_dds::arguments::ArgumentName,
        field_name: FieldName,
        object_type_name: Qualified<CustomTypeName>,
        data_connector_name: Qualified<DataConnectorName>,
    },

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Change the scalar type's representation to json, or remove the argument preset
  2. Type the preset argument with a scalar that uses the json representation
  3. Restructure so the preset is not needed for non-json scalars
Defensive patterns

Strategy: validation

Validate before calling

if let Some(preset) = link.argument_presets.get(&arg) {
    assert_eq!(scalar.representation, "json");
}

Prevention

When it happens

Trigger: Setting argumentPresets on a DataConnectorLink where the scalar type of the argument uses a non-json representation (e.g. a custom formatted/date representation).

Common situations: Adding presets on arguments typed with custom scalar representations; upgrading from versions where this was unvalidated.

Related errors


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