{"record":{"id":"5a15ed9dc7e0badf","repo":"hasura/graphql-engine","slug":"error-in-boolean-expression-type-type-name-e","errorCode":null,"errorMessage":"error in boolean expression type '{type_name}': {error}","messagePattern":"error in boolean expression type '(.+?)': (.+?)","errorType":"validation","errorClass":"NamedAggregateBooleanExpressionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs","lineNumber":114,"sourceCode":"}\n\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]\npub enum FilterInputDefinition {\n    FromModel(FromModelFilterInputDefinition),\n}\n\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]\npub struct FromModelFilterInputDefinition {\n    pub model_name: Qualified<ModelName>,\n}\n\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]\npub struct AggregatePredicateGraphqlConfig {\n    pub type_name: ast::TypeName,\n}\n\n#[derive(Debug, thiserror::Error)]\n#[error(\"error in boolean expression type '{type_name}': {error}\")]\npub struct NamedAggregateBooleanExpressionError {\n    pub type_name: Qualified<CustomTypeName>,\n    pub error: AggregateBooleanExpressionError,\n}\n\nimpl ContextualError for NamedAggregateBooleanExpressionError {\n    fn create_error_context(&self) -> Option<error_context::Context> {\n        None\n    }\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum AggregateBooleanExpressionError {\n    #[error(\"boolean expressions with aggregate operands are not supported\")]\n    AggregateBooleanExpressionsNotSupported,\n\n    #[error(\"boolean expressions with aggregate operands do not support isNull comparisons\")]\n    IsNullComparisonsNotSupported,","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs#L96-L132","documentation":"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.","triggerScenarios":"Any failure while resolving a named boolean expression's aggregate configuration: unsupported aggregate operands, GraphQL config errors, operand type mismatches, or missing aggregate expressions.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Always unwrap one level and handle the inner AggregateBooleanExpressionError:\nif let Some(named) = err.downcast_ref::<NamedAggregateBooleanExpressionError>() {\n    handle_aggregate_error(&named.error, &named.type_name);\n}","preventionTips":["Treat this as context, not a root cause — always inspect the inner error","Validate aggregate boolean expression blocks early in authoring"],"tags":["metadata","boolean-expression","aggregate","wrapper-error"],"backgroundTag":"invalid-filter-expression","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}