hasura/graphql-engine · error · GraphqlConfigError
the filterInputFieldName for aggregate needs to be defined i
Error message
the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API
What it means
Thrown during metadata resolution when a model exposes a `selectAggregate` GraphQL API but the GraphqlConfig does not define `filterInputFieldName` for aggregates. The resolver needs this configured field name to build the aggregate filter input type, so metadata resolution aborts. It comes from the graphql_config stage of metadata-resolve in Hasura DDN v3 engine.
Source
Thrown at v3/crates/metadata-resolve/src/stages/graphql_config/error.rs:43
)]
MissingOrderByInputFieldInGraphqlConfig,
#[error(
"the orderByInput.enumTypeNames needs to be defined in GraphqlConfig, when models have orderByExpressionType"
)]
MissingOrderByEnumTypeNamesInGraphqlConfig,
#[error(
"only one enumTypeNames can be defined in GraphqlConfig, whose direction values are both 'asc' and 'desc'."
)]
MultipleOrderByEnumTypeNamesInGraphqlConfig,
#[error(
"invalid directions: {directions} defined in orderByInput of GraphqlConfig , currently there is no support for partial directions. Please specify a type which has both 'asc' and 'desc' directions"
)]
InvalidOrderByDirection { directions: String },
#[error(
"the fieldName for argumentsInput needs to be defined in GraphqlConfig, when models have argumentsInputType"
)]
MissingArgumentsInputFieldInGraphqlConfig,
#[error(
"the filterInputFieldName for aggregate needs to be defined in GraphqlConfig, when models have a selectAggregate graphql API"
)]
MissingAggregateFilterInputFieldNameInGraphqlConfig,
#[error("\"{name:}\" is not a valid GraphQL name.")]
InvalidGraphQlName { name: String },
#[error("multiple graphql types found with the same name: {graphql_type_name:}")]
ConflictingGraphQlType { graphql_type_name: ast::TypeName },
}
impl ContextualError for GraphqlConfigError {
fn create_error_context(&self) -> Option<error_context::Context> {
None
}
}
View on GitHub (pinned to 724551b9ae)
Solutions
- Add filterInputFieldName for aggregates to your GraphqlConfig in the model's metadata (graphql_config) file
- Regenerate the graphql config for the model with the CLI (ddn plugin or `ddn build`) so defaults are filled in
- Verify the model actually intends to expose selectAggregate; if not, remove that API from the model
Example fix
# before
kind: GraphqlConfig
version: v1
definition: {}
# model has selectAggregate: {}
# after
kind: GraphqlConfig
version: v1
definition:
aggregate:
filterInputFieldName: filter
# ... plus required names for selectAggregate Defensive patterns
Strategy: validation
Validate before calling
# CI check before `ddn build`:
import yaml, sys
cfg = yaml.safe_load(open('subgraph/graphql-config.yaml'))
models = [yaml.safe_load(open(f)) for f in glob('subgraph/models/*.yaml')]
has_agg = any(m.get('definition',{}).get('selectAggregate',{}) is not None for m in models)
agg_cfg = cfg.get('definition',{}).get('aggregate',{})
if has_agg and 'filterInputFieldName' not in agg_cfg:
sys.exit('selectAggregate models require aggregate.filterInputFieldName') Prevention
- Always generate GraphqlConfig with `ddn build`/plugin rather than hand-writing it
- Run metadata validation in CI on every metadata PR
When it happens
Trigger: A model in OpenDD metadata declares a selectAggregate command/GraphQL API while the subgraph's GraphqlConfig section is missing the aggregate filterInputFieldName setting (e.g. a custom graphql config object that overrides defaults without specifying it).
Common situations: Hand-editing open-dds.yaml / graphql config files, upgrading to a metadata version where aggregate configs must be explicit, or copy-pasting a GraphqlConfig block that omits the aggregate filter field name.
Related errors
- could not find a scalar-operanded boolean expression type na
- the return type used on the {count_type} aggregate ({return_
- the return type used on the {count_type} aggregate ({return_
- empty fields in apollo federation keys defined for the objec
- Unknown type: {type_name}
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/7be85a01df00fad7.
Report an issue: GitHub.