hasura/graphql-engine · error · NDCValidationError
argument {argument_name} is not defined for collection {coll
Error message
argument {argument_name} is not defined for collection {collection_name} in data connector {db_name} What it means
NDCValidationError::NoSuchArgument indicates that metadata (typically a model's collection arguments or an argument mapping) references a data connector argument name that is not declared for the collection in the connector's schema. The resolver validates each NDC-side argument reference against the collection's argument list in the schema response.
Source
Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:27
commands::{CommandName, DataConnectorCommand, FunctionName, ProcedureName},
data_connector::{
CollectionName, DataConnectorColumnName, DataConnectorName, DataConnectorScalarType,
},
models::ModelName,
types::{CustomTypeName, DataConnectorArgumentName, FieldName},
};
use crate::types::subgraph::{Qualified, QualifiedTypeName, QualifiedTypeReference};
#[derive(Debug, thiserror::Error)]
pub enum NDCValidationError {
#[error("collection {collection_name} is not defined in data connector {db_name}")]
NoSuchCollection {
db_name: Qualified<DataConnectorName>,
model_name: Qualified<ModelName>,
collection_name: CollectionName,
},
#[error(
"argument {argument_name} is not defined for collection {collection_name} in data connector {db_name}"
)]
NoSuchArgument {
db_name: Qualified<DataConnectorName>,
collection_name: CollectionName,
argument_name: DataConnectorArgumentName,
},
#[error(
"argument {argument_name} is not defined for function/procedure {func_proc_name} in data connector {db_name}"
)]
NoSuchArgumentForCommand {
db_name: Qualified<DataConnectorName>,
func_proc_name: String,
argument_name: DataConnectorArgumentName,
},
#[error(
"column {column_name} is not defined in collection {collection_name} in data connector {db_name}"
)]View on GitHub (pinned to 724551b9ae)
Solutions
- Fetch the connector's schema and list the collection's declared arguments
- Correct the NDC argument name in the mapping/preset to match exactly
- If the argument should exist, fix the collection definition on the connector side and refresh the schema
- Remove stale mappings/presets for arguments the connector no longer has
Example fix
// before
"argument_presets": { "tenantID": ... }
// after
"argument_presets": { "tenant_id": ... } Defensive patterns
Strategy: validation
Validate before calling
let coll = schema.collections.iter().find(|c| c.name == collection_name).unwrap();
let declared: HashSet<_> = coll.arguments.keys().collect();
for name in referenced_ndc_args {
assert!(declared.contains(name), "NDC argument {name} not on collection {collection_name}");
} Type guard
fn ndc_argument_defined(name: &DataConnectorArgumentName, coll: &NdcCollection) -> bool {
coll.arguments.contains_key(name)
} Try / catch
On NoSuchArgument, print the collection's actual argument names alongside the missing one.
Prevention
- Generate argument mappings from the connector schema rather than by hand
- Diff connector schema on upgrades
- Use consistent snake_case naming to avoid case mismatches
When it happens
Trigger: A model mapping or preset referencing an NDC collection argument that was removed or renamed in the connector schema; adding an argument mapping with a typo'd NDC argument name; connector version change altering collection arguments.
Common situations: Connector schema drift after upgrade; hand-editing argument mappings; copying mappings between connectors whose argument names differ.
Related errors
- the type {unknown_ndc_type:} is not defined as an object typ
- the following data connector arguments are not mapped to an
- the type of argument '{argument_name:}' is not compatible wi
- collection {collection_name} is not defined in data connecto
- argument {argument_name} is not defined for function/procedu
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/51a3fdf8b15b0afe.
Report an issue: GitHub.