hasura/graphql-engine · error · ScalarBooleanExpressionTypeIssue
the boolean expression '{type_name}' has a GraphQL field nam
Error message
the boolean expression '{type_name}' has a GraphQL field name conflict between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed. What it means
Two fields of the boolean expression type resolve to the same GraphQL field name, coming from different sources (e.g. an operator and a logical operator, or two operators); one must be renamed.
Source
Thrown at v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs:86
MissingLogicalOperatorNamesInGraphqlConfig {
type_name: Qualified<CustomTypeName>,
},
// Because the GraphqlConfig's filterInputConfig requires all properties to be set, the effective meaning of not
// having the is_null operator set is that the entire boolean expression cannot be rendered in GraphQL and so we
// communicate that effect here, even though this issue is only about the is null operator specifically.
#[error(
"a graphql section is defined in boolean expression type '{type_name}' but it will not appear in the GraphQL API unless the is_null operator field name is also configured in the GraphqlConfig in query.filterInputConfig"
)]
MissingIsNullOperatorNameInGraphqlConfig {
type_name: Qualified<CustomTypeName>,
},
#[error(
"the boolean expression '{type_name}' has enabled logical operators, but they will not appear in the GraphQL API unless you update your CompatibilityConfig date to at least 2024-11-26"
)]
LogicalOperatorsUnavailable {
type_name: Qualified<CustomTypeName>,
},
#[error(
"the boolean expression '{type_name}' has a GraphQL field name conflict between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed."
)]
GraphqlFieldNameConflict {
type_name: Qualified<CustomTypeName>,
name: String,
name_source_1: FieldNameSource,
name_source_2: FieldNameSource,
},
#[error(
"the comparable operator '{name}' is defined more than once in the boolean expression type '{type_name}'"
)]
DuplicateComparableOperatorFound {
type_name: Qualified<CustomTypeName>,
name: OperatorName,
},
#[error("{0}")]
OperatorIssue(ScalarBooleanExpressionOperatorIssue),
}View on GitHub (pinned to 724551b9ae)
Solutions
- Rename one of the conflicting fields via its graphql field name configuration
- Check which sources (name_source_1, name_source_2) collide and adjust one
- Avoid custom names that shadow logical operators or is_null
Example fix
// before
- name: equal
graphql: {field_name: "_and"}
// after
- name: equal
graphql: {field_name: "_eq"} Defensive patterns
Strategy: validation
Validate before calling
// collect field names per type and detect collisions before apply
let mut seen = HashMap::new();
for f in &boolean_expression.fields {
if seen.insert(f.graphql_name.clone(), f.source).is_some() {
return Err(format!("GraphQL field name conflict: {}", f.graphql_name));
}
} Prevention
- Reserve logical operator names (_and/_or/_not) and is_null when naming custom operator fields
When it happens
Trigger: Name collisions in the generated GraphQL filter input, e.g. an operator whose graphql field name equals another operator's or a logical operator's name within the same boolean expression type.
Common situations: Custom operator GraphQL renames that clash with _and/_or/_not/is_null or with each other; adding a new operator that collides with an existing one.
Related errors
- the boolean expression '{type_name}' has a GraphQL field nam
- a graphql section is defined in boolean expression type '{ty
- a graphql section is defined in boolean expression type '{ty
- error fetching config from server: %w
- error fetching server config: %v
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/1e7448250a62f537.
Report an issue: GitHub.