{"record":{"id":"1cfe10a8ec66f2fc","repo":"hasura/graphql-engine","slug":"boolean-expression-boolean-expression-name-no","errorCode":null,"errorMessage":"boolean expression '{boolean_expression_name:}' not found","messagePattern":"boolean expression '(.+?)' not found","errorType":"validation","errorClass":"TypePredicateError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/types/error.rs","lineNumber":421,"sourceCode":"        field_name: Spanned<FieldName>,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"field '{field_name:}' of type '{type_name:}' is an array type and cannot be used in a nested field predicate\"\n    )]\n    ArrayFieldInNestedFieldPredicate {\n        field_name: Spanned<FieldName>,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"unknown field '{field_name}' for type '{type_name}' used in target mapping for relationship '{relationship_name}'\"\n    )]\n    UnknownFieldInModelRelationshipTargetMapping {\n        field_name: FieldName,\n        type_name: Qualified<CustomTypeName>,\n        relationship_name: RelationshipName,\n    },\n    #[error(\"boolean expression '{boolean_expression_name:}' not found\")]\n    BooleanExpressionNotFound {\n        boolean_expression_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"field '{field_name:}' could not be found in boolean expression type for object type '{type_name:}'\"\n    )]\n    BooleanExpressionFieldNotFound {\n        field_name: Spanned<FieldName>,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"the source data connector {data_connector:} for type {type_name:} has not been defined\"\n    )]\n    UnknownTypeDataConnector {\n        type_name: Qualified<CustomTypeName>,\n        data_connector: Qualified<DataConnectorName>,\n    },\n    #[error(","sourceCodeStart":403,"sourceCodeEnd":439,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/types/error.rs#L403-L439","documentation":"The metadata resolver was asked to use a boolean expression type (a named custom type used for filtering) but no type with that name exists in the resolved metadata. Boolean expression types must be declared as object types before they can be referenced (e.g. by filterExpressionType).","triggerScenarios":"Setting a model's `filterExpressionType` to a name that is not declared anywhere; renaming a boolean expression type without updating references; referencing it before it is defined (ordering/reference errors in metadata).","commonSituations":"Renaming type definitions in one file but not the references in another; deleting an unused-looking object type that was actually a boolean expression type; typos in the qualified name (subgraph prefix mismatch).","solutions":["Search metadata for `boolean_expression_name` — confirm it's declared as an object type in the same subgraph","Declare the missing boolean expression type or fix the reference to the correct (qualified) name","Check the subgraph namespace prefix matches the reference (e.g. `default/MyExpr` vs `other/MyExpr`)"],"exampleFix":"# before\nmodels:\n  users:\n    filterExpressionType: UserBooleanExpr  # not defined anywhere\n# after\ntypes:\n  UserBooleanExpr: {fields: {...}}\nmodels:\n  users:\n    filterExpressionType: UserBooleanExpr\n","handlingStrategy":"validation","validationCode":"// Ensure the referenced boolean expression type is declared\nif !metadata.types.contains_key(&qualified_name) {\n    return Err(format!(\"boolean expression type {qualified_name} not declared\"));\n}","typeGuard":"fn expr_type_exists<'a>(md: &'a Metadata, n: &Qualified<CustomTypeName>) -> Option<&'a ObjectType> {\n    md.types.get(n)\n}","tryCatchPattern":"if let Err(TypePredicateError::BooleanExpressionNotFound { boolean_expression_name }) = result {\n    return Err(format!(\"declare type {boolean_expression_name} or fix the reference\"));\n}","preventionTips":["Declare filter types before referencing them","Use consistent subgraph-qualified names everywhere"],"tags":["metadata","boolean-expression","type-not-found","hasura"],"backgroundTag":"type-not-found","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}