{"record":{"id":"5dac464b79aae6c3","repo":"hasura/graphql-engine","slug":"the-boolean-expression-type-boolean-expression-t","errorCode":null,"errorMessage":"the boolean expression type ({boolean_expression_type}) used in the comparable field '{field_name}' could not be found","messagePattern":"the boolean expression type \\((.+?)\\) used in the comparable field '(.+?)' could not be found","errorType":"validation","errorClass":"AggregateBooleanExpressionError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs","lineNumber":260,"sourceCode":"    },\n\n    #[error(\n        \"the operand object type '{operand_type}' does not contain the field '{field_name}' used in the comparable fields\"\n    )]\n    ComparableFieldNotFoundOnObjectType {\n        operand_type: Qualified<CustomTypeName>,\n        field_name: FieldName,\n    },\n\n    #[error(\n        \"the type of the comparable field '{field_name}' ({field_type}) is an array type. Nested aggregation over array types is not supported\"\n    )]\n    ComparableFieldNestedArrayTypeNotSupported {\n        field_name: FieldName,\n        field_type: QualifiedTypeReference,\n    },\n\n    #[error(\n        \"the boolean expression type ({boolean_expression_type}) used in the comparable field '{field_name}' could not be found\"\n    )]\n    ComparableFieldBooleanExpressionNotFound {\n        field_name: FieldName,\n        boolean_expression_type: Qualified<CustomTypeName>,\n    },\n\n    #[error(\n        \"the boolean expression type ({boolean_expression_type}) used in the comparable field '{field_name}' must have a '{aggregate_operand_type}' operand, to match the field type '{field_type}'\"\n    )]\n    ComparableFieldBooleanExpressionIncorrectOperandType {\n        boolean_expression_type: Qualified<CustomTypeName>,\n        aggregate_operand_type: AggregateOperandType,\n        field_name: FieldName,\n        field_type: QualifiedTypeName,\n    },\n\n    #[error(","sourceCodeStart":242,"sourceCodeEnd":278,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs#L242-L278","documentation":"During resolution of comparable fields, the resolver could not find the boolean expression type that is supposed to be attached to a comparable (nested) field. Each comparable field that references another type must have a matching boolean expression type registered in the metadata; if the qualified name lookup fails, this error is raised.","triggerScenarios":"A comparable field references a boolean expression type (e.g. via the type's aggregate bool exp annotation) whose qualified <subgraph::TypeName> is not present among the resolved boolean expression types.","commonSituations":"Typo or case mismatch in the boolean expression type name, forgetting to define/enable the boolean expression type for the nested type, or referencing a type from a different subgraph/namespace that hasn't been declared or exported.","solutions":["Verify the exact qualified name (including subgraph/namespace) of the boolean expression type referenced by the comparable field and fix typos/casing","Define the missing boolean expression type (or add the appropriate annotation) for the nested type in the metadata","Ensure the referenced type is properly exported/available in the subgraph where it is used"],"exampleFix":"// before\ncomparableField:\n  fieldName: author\n  booleanExpressionType: author_bool_exp   // wrong name; actual type is AuthorBoolExp\n\n// after\ncomparableField:\n  fieldName: author\n  booleanExpressionType: AuthorBoolExp","handlingStrategy":"validation","validationCode":"let exists = resolved_bool_exp_types.contains_key(&comparable_field.boolean_expression_type);\nif !exists { /* fail fast with a clear message before resolve */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Maintain a registry of defined boolean expression type names and validate references in CI","Generate metadata (rather than hand-writing) so referenced types always exist"],"tags":["rust","hasura","metadata","boolean-expression","type-not-found"],"backgroundTag":"type-not-found-in-schema","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}