hasura/graphql-engine · error · AggregateBooleanExpressionError

{0}

Error message

{0}

What it means

AggregateBooleanExpressionError::GraphqlConfigError is a #[from] conversion that transparently forwards ({0}) any GraphqlConfigError raised while reading the GraphQL configuration block of an aggregate boolean expression type (e.g. its GraphQL type name).

Source

Thrown at v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs:134

    pub type_name: Qualified<CustomTypeName>,
    pub error: AggregateBooleanExpressionError,
}

impl ContextualError for NamedAggregateBooleanExpressionError {
    fn create_error_context(&self) -> Option<error_context::Context> {
        None
    }
}

#[derive(Debug, thiserror::Error)]
pub enum AggregateBooleanExpressionError {
    #[error("boolean expressions with aggregate operands are not supported")]
    AggregateBooleanExpressionsNotSupported,

    #[error("boolean expressions with aggregate operands do not support isNull comparisons")]
    IsNullComparisonsNotSupported,

    #[error("{0}")]
    GraphqlConfigError(#[from] GraphqlConfigError),

    #[error("the operand type '{operand_type}' must be a scalar type")]
    OperandTypeIsNotAScalarType {
        operand_type: Qualified<CustomTypeName>,
    },

    #[error("the operand type '{operand_type}' must be an object type")]
    OperandTypeIsNotAnObjectType {
        operand_type: Qualified<CustomTypeName>,
    },

    #[error("the aggregate expression '{aggregate_expression}' could not be found")]
    AggregateExpressionNotFound {
        aggregate_expression: Qualified<AggregateExpressionName>,
    },

    #[error(

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Inspect the underlying GraphqlConfigError message for the exact config problem
  2. Fix or add the graphql type_name for the aggregate boolean expression type
  3. Validate GraphQL naming rules (letters, digits, underscores, not starting with a digit)

Example fix

# before
graphql_config:
  type_name: "invalid name!"

# after
graphql_config:
  type_name: UserAggregateExpression
Defensive patterns

Strategy: validation

Validate before calling

fn valid_graphql_name(name: &str) -> bool {
    let mut chars = name.chars();
    matches!(chars.next(), Some(c) if c.is_alphabetic() || c == '_')
        && chars.all(|c| c.is_alphanumeric() || c == '_')
}

Try / catch

if let AggregateBooleanExpressionError::GraphqlConfigError(inner) = err {
    eprintln!("fix graphql_config: {inner}");
}

Prevention

When it happens

Trigger: Providing a graphql_config for an aggregate boolean expression whose type_name is missing, malformed, or conflicts with existing GraphQL type naming rules.

Common situations: Typos in the graphql config section, missing type_name field, invalid GraphQL type names (spaces, leading digits) in the boolean expression's GraphQL configuration.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/e5c503a0296d67d3. Report an issue: GitHub.