hasura/graphql-engine · error · BooleanExpressionError::DifferentDataConnectorObjectTypeInFilterExpression
Model {model:} has source data connector object type {model_
Error message
Model {model:} has source data connector object type {model_data_connector_object_type:} but its filter expression type {filter_expression_type:} is backed by data connector {filter_expression_data_connector_object_type:} What it means
Same connector-consistency rule as the data connector variant, but at the object-type level: the model's source data connector object type (collection/table mapping) differs from the data connector object type backing the filter expression type.
Source
Thrown at v3/crates/metadata-resolve/src/stages/boolean_expressions/error.rs:180
#[error(
"Target model {model_name:} not found, referenced in relationship {relationship_name:}"
)]
TargetModelNotFound {
relationship_name: RelationshipName,
model_name: Qualified<ModelName>,
},
#[error(
"Model {model:} has source data connector {model_data_connector:} but its filter expression type {filter_expression_type:} is backed by data connector {filter_expression_data_connector:}"
)]
DifferentDataConnectorInFilterExpression {
model: Qualified<ModelName>,
model_data_connector: Qualified<DataConnectorName>,
filter_expression_type: Qualified<CustomTypeName>,
filter_expression_data_connector: Qualified<DataConnectorName>,
},
#[error(
"Model {model:} has source data connector object type {model_data_connector_object_type:} but its filter expression type {filter_expression_type:} is backed by data connector {filter_expression_data_connector_object_type:}"
)]
DifferentDataConnectorObjectTypeInFilterExpression {
model: Qualified<ModelName>,
model_data_connector_object_type: DataConnectorObjectType,
filter_expression_type: Qualified<CustomTypeName>,
filter_expression_data_connector_object_type: DataConnectorObjectType,
},
#[error(
"The relationship '{relationship_name}' cannot be used as a comparable relationship in boolean expression type '{boolean_expression_type_name}' because it is a remote relationship with an argument mapping target. Relationship '{relationship_name}' on type '{source_type}' has source field '{source_field}' mapped to target argument '{target_argument}'"
)]
RemoteComparableRelationshipWithArgumentMappingTargetNotSupported {
boolean_expression_type_name: Qualified<CustomTypeName>,
relationship_name: open_dds::relationships::RelationshipName,
source_type: Qualified<CustomTypeName>,
source_field: FieldName,
target_argument: open_dds::query::ArgumentName,View on GitHub (pinned to 724551b9ae)
Solutions
- Regenerate or update the boolean expression type so its backing data connector object type matches the model's source object type
- If the source object type was renamed, update the boolean expression type's reference to the new name
Example fix
// before: filter type backed by object type 'albums_v1', source table 'albums' // after: regenerate the boolean expression type against 'albums' so both match
Defensive patterns
Strategy: validation
Validate before calling
const sourceObjType = objectTypeOf(model.source);
if (boolExpObjectType(boolExpType) !== sourceObjType) {
fail(`object type mismatch: model=${sourceObjType} filter=${boolExpObjectType(boolExpType)}`);
} Prevention
- Regenerate filter types whenever a table/collection mapping changes
- Treat object type names as part of the connector contract and update references on rename
When it happens
Trigger: A booleanExpressionType whose underlying data connector object type name (e.g. a different table/collection mapping) does not match the object type of the model's source, even within the same connector.
Common situations: Reusing a filter type generated for a different table of the same connector; renaming a table in the source without updating the boolean expression type; manually editing data connector object type references.
Related errors
- Scalar representations for data connector '{data_connector_n
- data connector {data_connector:} could not be found
- error fetching config from server: %w
- error fetching server config: %v
- the operand type '{operand_type}' must be an object type
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/5e6b51734722829c.
Report an issue: GitHub.