hasura/graphql-engine · error · NDCValidationError
procedure {procedure_name} is not defined in data connector
Error message
procedure {procedure_name} is not defined in data connector {db_name} What it means
NDCValidationError::NoSuchProcedure means metadata defines a command backed by a data connector procedure, but the connector's schema response does not contain a procedure with that name. The resolver validates the procedure reference (command_name and procedure_name) against the connector's procedures list and fails when absent.
Source
Thrown at v3/crates/metadata-resolve/src/helpers/ndc_validation.rs:53
#[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}")]
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,View on GitHub (pinned to 724551b9ae)
Solutions
- Verify the stored procedure exists in the target database with the exact name (including case and any schema qualification)
- Correct the procedure_name in the command's NDC mapping
- Ensure the connector's schema/capabilities expose procedures and refresh the schema
- Recreate the procedure in the database if it was dropped
Example fix
// before "ndc_procedure_name": "getUsrById" // after "ndc_procedure_name": "get_user_by_id"
Defensive patterns
Strategy: validation
Validate before calling
let procs: HashSet<_> = schema.procedures.iter().map(|p| p.name.clone()).collect();
assert!(procs.contains(&procedure_name),
"procedure {procedure_name} not defined by connector {db_name}"); Type guard
fn procedure_exists(name: &ProcedureName, s: &NdcSchema) -> bool {
s.procedures.iter().any(|p| &p.name == name)
} Try / catch
On NoSuchProcedure, suggest verifying the stored procedure exists and that connector capabilities expose procedures.
Prevention
- Include procedure creation in migrations
- Refresh connector schema after creating/dropping procedures
- Verify connector capabilities advertise procedure support before mapping commands
When it happens
Trigger: A command mapped to an NDC procedure that was renamed/dropped in the database; connector pointed at a database where the procedure doesn't exist; typo in procedure_name; procedures not exposed by the connector's capabilities/schema.
Common situations: DB migrations removing stored procedures; environment drift; connector upgrades disabling procedure support; metadata referencing a procedure never created in this environment.
Related errors
- the type {unknown_ndc_type:} is not defined as an object typ
- collection {collection_name} is not defined in data connecto
- argument {argument_name} is not defined for collection {coll
- column {column_name} is not defined in collection {collectio
- unable to parse server endpoint: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/5c2a5cf274faeb8a.
Report an issue: GitHub.