hasura/graphql-engine · error · NamedAggregateBooleanExpressionError
error in boolean expression type '{type_name}': {error}
Error message
error in boolean expression type '{type_name}': {error} What it means
NamedAggregateBooleanExpressionError wraps an AggregateBooleanExpressionError and prefixes it with the qualified name of the boolean expression type being resolved. It gives top-level context ('error in boolean expression type X') around any lower-level failure in the aggregate boolean expression resolution stage.
Source
Thrown at v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs:114
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub enum FilterInputDefinition {
FromModel(FromModelFilterInputDefinition),
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub struct FromModelFilterInputDefinition {
pub model_name: Qualified<ModelName>,
}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]
pub struct AggregatePredicateGraphqlConfig {
pub type_name: ast::TypeName,
}
#[derive(Debug, thiserror::Error)]
#[error("error in boolean expression type '{type_name}': {error}")]
pub struct NamedAggregateBooleanExpressionError {
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,View on GitHub (pinned to 724551b9ae)
Solutions
- Read the nested {error:} field — it identifies the actual AggregateBooleanExpressionError variant to fix
- Verify the named boolean expression type's operand and aggregate expression references in metadata
- Check the OpenDD aggregate boolean expression docs for the supported operand shapes
Defensive patterns
Strategy: try-catch
Try / catch
// Always unwrap one level and handle the inner AggregateBooleanExpressionError:
if let Some(named) = err.downcast_ref::<NamedAggregateBooleanExpressionError>() {
handle_aggregate_error(&named.error, &named.type_name);
} Prevention
- Treat this as context, not a root cause — always inspect the inner error
- Validate aggregate boolean expression blocks early in authoring
When it happens
Trigger: Any failure while resolving a named boolean expression's aggregate configuration: unsupported aggregate operands, GraphQL config errors, operand type mismatches, or missing aggregate expressions.
Common situations: Declaring a boolean expression type with aggregate operands for the first time, upgrading metadata-connector versions where aggregate expression rules changed, referencing aggregate expressions by wrong qualified names.
Related errors
- boolean expressions with aggregate operands are not supporte
- boolean expressions with aggregate operands do not support i
- {0}
- the operand type '{operand_type}' must be a scalar type
- the operand type '{operand_type}' must be an object type
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/5a15ed9dc7e0badf.
Report an issue: GitHub.