hasura/graphql-engine · error · NDCValidationError
argument {argument_name} is not defined for function/procedu
Error message
argument {argument_name} is not defined for function/procedure {func_proc_name} in data connector {db_name} What it means
Variant of NoSuchArgument specific to commands: metadata for a function or procedure command references an NDC argument that the connector's schema does not define for that function/procedure. The error includes the data connector name, the function/procedure name, and the offending NDC argument name.
Source
Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:35
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}"
)]
NoSuchColumn {
db_name: Qualified<DataConnectorName>,
model_name: Qualified<ModelName>,
field_name: FieldName,
collection_name: CollectionName,
column_name: DataConnectorColumnName,
},
#[error("procedure {procedure_name} is not defined in data connector {db_name}")]View on GitHub (pinned to 724551b9ae)
Solutions
- Check the function/procedure signature in the database and the connector's schema for the exact parameter names
- Update the argument mapping's ndc_argument_name to the current parameter name
- If the parameter was removed, delete the mapping or preset for it
- Refresh the connector schema and re-validate metadata
Example fix
// before
"arguments": { "usr_id": { "ndc_argument_name": "usr_id" } }
// after
"arguments": { "user_id": { "ndc_argument_name": "user_id" } } Defensive patterns
Strategy: validation
Validate before calling
let fp = schema.functions.iter().chain(schema.procedures.iter())
.find(|f| f.name == func_proc_name)
.ok_or_else(|| format!("{func_proc_name} not in connector schema"))?;
for name in referenced_args {
assert!(fp.arguments.contains_key(name), "argument {name} not on {func_proc_name}");
} Type guard
fn command_argument_defined(name: &str, fp: &NdcFunctionOrProcedure) -> bool {
fp.arguments.contains_key(name)
} Try / catch
Catch NoSuchArgumentForCommand and show the function/procedure's real parameter list to guide the fix.
Prevention
- Keep DB function signatures and metadata in sync via migrations
- Regenerate command metadata after signature changes
- Validate command mappings against live connector schema in CI
When it happens
Trigger: A command (function/procedure) mapped to a data connector whose argument mapping references an argument name not present in the connector's function/procedure definition; the database function signature changed (parameter renamed/removed); typo in ndc_argument_name in metadata.
Common situations: Database migrations altering function/procedure signatures; connector upgrades renaming parameters; metadata written by hand or generated against an older schema.
Related errors
- the following data connector arguments are not mapped to an
- the type of argument '{argument_name:}' is not compatible wi
- argument {argument_name} is not defined for collection {coll
- unable to parse server endpoint: %w
- the type {unknown_ndc_type:} is not defined as an object typ
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/0dbb4d2d12eb7b01.
Report an issue: GitHub.