hasura/graphql-engine · error · AggregateBooleanExpressionError
the comparable relationship '{relationship_name}' for the op
Error message
the comparable relationship '{relationship_name}' for the operand type '{operand_type}' targets a model than cannot be found: '{target_model_name}' What it means
A comparable relationship resolves to a target model by qualified name, but that model cannot be found in the resolved metadata. Without the target model, the resolver cannot compute the target's boolean expression/aggregation types and aborts.
Source
Thrown at v3/crates/metadata-resolve/src/stages/aggregate_boolean_expressions/types.rs:319
},
#[error(
"the comparable relationship '{relationship_name}' for the operand type '{operand_type}' targets a command. This is not supported"
)]
ComparableRelationshipCommandTargetNotSupported {
operand_type: Qualified<CustomTypeName>,
relationship_name: RelationshipName,
},
#[error(
"the comparable relationship '{relationship_name}' for the operand type '{operand_type}' is an array relationship. This is not supported"
)]
ComparableArrayRelationshipNotSupported {
operand_type: Qualified<CustomTypeName>,
relationship_name: RelationshipName,
},
#[error(
"the comparable relationship '{relationship_name}' for the operand type '{operand_type}' targets a model than cannot be found: '{target_model_name}'"
)]
ComparableRelationshipTargetModelNotFound {
operand_type: Qualified<CustomTypeName>,
relationship_name: open_dds::relationships::RelationshipName,
target_model_name: Qualified<open_dds::models::ModelName>,
},
#[error(
"the comparable relationship '{relationship_name}' for the operand type '{operand_type}' references a boolean expression type that cannot be found: '{boolean_expression_type}'"
)]
ComparableRelationshipBooleanExpressionNotFound {
operand_type: Qualified<CustomTypeName>,
relationship_name: open_dds::relationships::RelationshipName,
boolean_expression_type: Qualified<CustomTypeName>,
},
#[error(View on GitHub (pinned to 724551b9ae)
Solutions
- Verify the target model exists under the exact qualified name (subgraph::ModelName) the relationship references
- Fix stale references after model renames or subgraph renames
- If the model lives elsewhere, include that subgraph/metadata source in the build or add the model locally
Example fix
# before
relationship:
name: author
target: { model: { name: Author, subgraph: old } } # subgraph renamed to 'content'
# after
relationship:
name: author
target: { model: { name: Author, subgraph: content } } Defensive patterns
Strategy: validation
Validate before calling
for r in &comparable_relationships {
if let Some(model) = r.target_model() {
assert!(models.contains_key(model), "target model {} not found", model);
}
} Prevention
- Validate all relationship target references against the model catalog before resolve
- Keep subgraph names stable or run a codemod when renaming them
When it happens
Trigger: The relationship's target model qualified name (subgraph + ModelName) does not match any model present in the metadata being resolved.
Common situations: Renaming or deleting a model without updating relationships pointing at it; subgraph name changes making the qualified target stale; referencing a model defined in another subgraph/project that is not part of the build.
Related errors
- the relationship '{relationship_name}' is defined more than
- the comparable relationship '{relationship_name}' for the op
- relationship '{relationship_name}' is used in comparableRela
- the comparable relationship '{name}' is defined more than on
- Condition {condition_hash} not found
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/125732db2d453a58.
Report an issue: GitHub.