{"record":{"id":"6b38956ecc87a5f9","repo":"hasura/graphql-engine","slug":"boolean-expressions-with-aggregate-operands-do-not","errorCode":null,"errorMessage":"boolean expressions with aggregate operands do not support isNull comparisons","messagePattern":"boolean expressions with aggregate operands do not support isNull comparisons","errorType":"validation","errorClass":"AggregateBooleanExpressionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs","lineNumber":131,"sourceCode":"#[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,\n\n    #[error(\"{0}\")]\n    GraphqlConfigError(#[from] GraphqlConfigError),\n\n    #[error(\"the operand type '{operand_type}' must be a scalar type\")]\n    OperandTypeIsNotAScalarType {\n        operand_type: Qualified<CustomTypeName>,\n    },\n\n    #[error(\"the operand type '{operand_type}' must be an object type\")]\n    OperandTypeIsNotAnObjectType {\n        operand_type: Qualified<CustomTypeName>,\n    },\n\n    #[error(\"the aggregate expression '{aggregate_expression}' could not be found\")]\n    AggregateExpressionNotFound {\n        aggregate_expression: Qualified<AggregateExpressionName>,","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs#L113-L149","documentation":"AggregateBooleanExpressionError::IsNullComparisonsNotSupported: within a boolean expression with aggregate operands, the isNull comparison operator is explicitly not supported, and using it triggers this error during metadata resolution.","triggerScenarios":"Including an isNull (null-check) comparison in the comparable operators of an aggregate boolean expression type.","commonSituations":"Copying a regular boolean expression definition (which commonly allows isNull) into an aggregate one; assuming all standard comparison operators transfer to aggregate operands.","solutions":["Remove isNull from the comparable/operand comparison list of the aggregate boolean expression","Perform null checks on the underlying fields before aggregation instead","Restructure the expression to use supported comparisons like _eq/_gt on aggregate results"],"exampleFix":"# before\ncomparable:\n  operators: [isNull, eq]\n# with aggregate operands\n\n# after\ncomparable:\n  operators: [eq]","handlingStrategy":"validation","validationCode":"const SUPPORTED_OPS: &[&str] = &[\"eq\", \"neq\", \"gt\", \"lt\", \"gte\", \"lte\"];\nfn ops_supported(ops: &[String]) -> bool {\n    ops.iter().all(|o| SUPPORTED_OPS.contains(&o.as_str()))\n}","typeGuard":null,"tryCatchPattern":"if let AggregateBooleanExpressionError::IsNullComparisonsNotSupported = err {\n    eprintln!(\"remove isNull from the aggregate expression's comparisons\");\n}","preventionTips":["Never copy isNull into aggregate boolean expression definitions","Check supported operator lists in the docs per expression kind"],"tags":["metadata","boolean-expression","aggregate","isnull"],"backgroundTag":"unsupported-operation-config","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}