hasura/graphql-engine · error · ScalarBooleanExpressionOperatorIssue

The operator '{operator_name}' is mapped to '{mapped_operato

Error message

The operator '{operator_name}' is mapped to '{mapped_operator_name}' for the data connector '{data_connector_name}' in the boolean expression '{type_name}', but the mapped operator is not found in the data connector.

What it means

An operator in the boolean expression type is mapped to a data connector comparison operator, but that mapped operator does not exist in the connector's reported capabilities.

Source

Thrown at v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs:129

            }
            | ScalarBooleanExpressionTypeIssue::MissingIsNullOperatorNameInGraphqlConfig {
                ..
            }
            | ScalarBooleanExpressionTypeIssue::LogicalOperatorsUnavailable { .. } => false,
            ScalarBooleanExpressionTypeIssue::GraphqlFieldNameConflict { .. }
            | ScalarBooleanExpressionTypeIssue::DuplicateComparableOperatorFound { .. } => {
                flags.contains(flags::Flag::DisallowDuplicateNamesInBooleanExpressions)
            }
            ScalarBooleanExpressionTypeIssue::OperatorIssue(issue) => {
                issue.should_be_an_error(flags)
            }
        }
    }
}

#[derive(Debug, thiserror::Error)]
pub enum ScalarBooleanExpressionOperatorIssue {
    #[error(
        "The operator '{operator_name}' is mapped to '{mapped_operator_name}' for the data connector '{data_connector_name}' in the boolean expression '{type_name}', but the mapped operator is not found in the data connector."
    )]
    MappedOperatorNotFound {
        type_name: Qualified<CustomTypeName>,
        operator_name: OperatorName,
        mapped_operator_name: ndc_models::ComparisonOperatorName,
        data_connector_name: Qualified<DataConnectorName>,
    },
    #[error(
        "the argument type '{argument_type}' for the operator '{operator_name}' in the boolean expression '{type_name}' should be a list"
    )]
    ArgumentTypeShouldBeList {
        type_name: Qualified<CustomTypeName>,
        operator_name: OperatorName,
        argument_type: QualifiedTypeReference,
    },
    #[error(
        "the argument type '{argument_type}' for the operator '{operator_name}' in the boolean expression '{type_name}' should match the scalar type '{scalar_type}'"

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Check the data connector's capabilities for the correct comparison operator name and fix the mapping
  2. Update the connector so the operator exists
  3. Remove the mapping if the connector provides a default for the operator

Example fix

// before
mapped_operator_name: "eq"
// after
mapped_operator_name: "$eq"
Defensive patterns

Strategy: validation

Validate before calling

// verify mapped operator exists in connector capabilities
let ops: HashSet<_> = connector_comparison_ops(&caps).collect();
if !ops.contains(&mapped_operator_name) {
    return Err(format!("mapped operator {} not in connector", mapped_operator_name));
}

Prevention

When it happens

Trigger: Setting an operator mapping (e.g. equal -> "$eq") for a data connector whose capabilities/schema does not list that comparison operator name.

Common situations: Typos in mapped operator names, connector version changes that renamed operators, or mappings written for a different connector dialect.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/c72030761cdd9f90. Report an issue: GitHub.