hasura/graphql-engine · error · NDCValidationError
function {function_name} is not defined in data connector {d
Error message
function {function_name} is not defined in data connector {db_name} What it means
Thrown during metadata resolution when a Command is configured to call a function that the target data connector's schema does not expose. The resolver cross-checks every function referenced in command definitions against the NDC connector's capability/schema response.
Source
Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:59
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}")]
NoSuchProcedure {
db_name: Qualified<DataConnectorName>,
command_name: Qualified<CommandName>,
procedure_name: ProcedureName,
},
#[error("function {function_name} is not defined in data connector {db_name}")]
NoSuchFunction {
db_name: Qualified<DataConnectorName>,
command_name: Qualified<CommandName>,
function_name: FunctionName,
},
#[error(
"column {column_name} is not defined in function/procedure {func_proc_name} in data connector {db_name}"
)]
NoSuchColumnForCommand {
db_name: Qualified<DataConnectorName>,
command_name: Qualified<CommandName>,
field_name: FieldName,
func_proc_name: String,
column_name: DataConnectorColumnName,
},
#[error(
"column {column_name} has type {column_type} in collection {collection_name} in data connector {db_name}, not type {field_type}"
)]View on GitHub (pinned to 724551b9ae)
Solutions
- Verify the function exists in the data connector (query the database or the connector's /schema endpoint) and correct the function name in the Command definition
- Reload/refresh the data connector's schema cache if the function was recently created
- Align the metadata's function name with the connector's actual exported function name
Example fix
# before
kind: Command
spec:
target:
function:
name: get_user_by_email # does not exist in connector
# after
kind: Command
spec:
target:
function:
name: getUserByEmail # matches connector schema Defensive patterns
Strategy: validation
Validate before calling
// before resolving, check the function exists in the connector schema let exists = connector_schema.functions.iter().any(|f| f.name == metadata_function_name);
Prevention
- Keep connector schema in sync with the database (refresh before resolving)
- Lint metadata function names against the connector schema in CI
When it happens
Trigger: Defining a Command with a CommandFunction target where function_name does not exist in the data connector's reported functions; using a stale connector schema after the function was renamed/dropped in the underlying database.
Common situations: Function renamed or dropped in the database without updating the metadata; typo in function name in the YAML metadata; connector schema cache out of date; promoting metadata between environments with different DB schemas.
Related errors
- unable to parse server endpoint: %w
- column {column_name} is not defined in function/procedure {f
- NDC validation error: {0}
- unknown target command {command_name:} used in relationship
- target argument {argument_name} in argument mapping for rela
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/d90671f32f75d4e3.
Report an issue: GitHub.