hasura/graphql-engine · error · GraphqlConfigError
the filterInput needs to be defined in GraphqlConfig, when m
Error message
the filterInput needs to be defined in GraphqlConfig, when models have filterExpressionType
What it means
Raised when any model in the supergraph declares a `filterExpressionType` (i.e. supports filter expressions) but the GraphqlConfig does not define `filterInput`. The filter input object name must be configured before filters can be wired into the GraphQL schema. Thrown by the graphql_config resolution stage.
Source
Thrown at v3/crates/metadata-resolve/src/stages/graphql_config/error.rs:19
use graphql_types as ast;
use crate::types::error::ContextualError;
#[derive(Debug, thiserror::Error)]
pub enum GraphqlConfigError {
#[error("graphql configuration is not defined in supergraph")]
MissingGraphqlConfig,
#[error("graphql configuration should be defined only once in supergraph")]
MultipleGraphqlConfigDefinition,
#[error(
"the fieldName for limitInput needs to be defined in GraphqlConfig, when models have a selectMany graphql API"
)]
MissingLimitFieldInGraphqlConfig,
#[error(
"the fieldName for offsetInput needs to be defined in GraphqlConfig, when models have a selectMany graphql API"
)]
MissingOffsetFieldInGraphqlConfig,
#[error(
"the filterInput needs to be defined in GraphqlConfig, when models have filterExpressionType"
)]
MissingFilterInputFieldInGraphqlConfig,
#[error(
"the orderByInput needs to be defined in GraphqlConfig, when models have orderByExpressionType"
)]
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"
)]View on GitHub (pinned to 724551b9ae)
Solutions
- Add `filterInput: {fieldName: "where"}` (or your naming convention) to GraphqlConfig
- Verify every model that uses filterExpressionType is covered by the single shared config
- Regenerate metadata with tooling that emits filterInput when filters are used
Example fix
// before
{"graphql": {"limitInput": {"fieldName": "limit"}}, "models": [{"filterExpressionType": "users_filter"}]}
// after
{"graphql": {"filterInput": {"fieldName": "where"}, "limitInput": {"fieldName": "limit"}}, "models": [{"filterExpressionType": "users_filter"}]} Defensive patterns
Strategy: validation
Validate before calling
let uses_filter = models.iter().any(|m| m.filter_expression_type.is_some());
if uses_filter {
assert!(config.filter_input.as_ref().is_some_and(|f| f.field_name.is_some()));
} Type guard
fn filter_ok(config: &GraphqlConfig, models: &[Model]) -> bool {
!models.iter().any(|m| m.filter_expression_type.is_some())
|| config.filter_input.as_ref().is_some_and(|f| f.field_name.is_some())
} Try / catch
Err(GraphqlConfigError::MissingFilterInputFieldInGraphqlConfig) => { /* add filterInput.fieldName and re-resolve */ } Prevention
- Add filterInput whenever introducing filterExpressionType
- Keep a checklist of model features vs required config fields
- Validate metadata in CI
When it happens
Trigger: Metadata has a model with filterExpressionType set while GraphqlConfig lacks the `filterInput` definition; running metadata resolution/validation fails with this error.
Common situations: Adding filter support to an existing model without extending the graphql config; upgrading to a version that enforces filterInput presence; template metadata that only configures pagination fields.
Related errors
- graphql configuration is not defined in supergraph
- the orderByInput needs to be defined in GraphqlConfig, when
- the orderByInput.enumTypeNames needs to be defined in Graphq
- invalid directions: {directions} defined in orderByInput of
- the fieldName for argumentsInput needs to be defined in Grap
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/da3f3d132895ec78.
Report an issue: GitHub.