hasura/graphql-engine · error · ScalarBooleanExpressionTypeError

scalar type representation required for type

Error message

scalar type representation required for type {scalar_type:} in data connector {data_connector:}

What it means

A boolean expression operator requires a specific scalar type representation from the data connector (e.g. for equality/comparison arguments), but that scalar type is absent from the connector's scalar representations.

Solutions

  1. Confirm the connector actually supports the scalar type referenced by the operator
  2. Refresh the connector's capabilities/schema so newly added scalar types appear
  3. Remove or remap the operator to a supported scalar type
Defensive patterns

Strategy: validation

Validate before calling

// check required scalar type exists in connector representations
let scalars: HashSet<_> = caps.scalar_types.keys().cloned().collect();
for op in &required_operators {
    if !scalars.contains(&op.scalar_type) { return Err(format!("missing scalar: {}", op.scalar_type)); }
}

Prevention

When it happens

Trigger: An operator on a boolean expression type is used against a scalar whose DataConnectorScalarType is not present in the connector's reported scalar type representations.

Common situations: Connector does not support the scalar type used by the operator (e.g. a custom scalar), capabilities out of date after the connector added new types, or mapping an operator to a type the connector never exports.

Related errors


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

Appendix: source

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

        scalar_type: DataConnectorScalarType,
    },
    #[error(
        "cannot find type {custom_type:} when resolving arguments for comparison operator {operator_name:} for {boolean_expression_type:}"
    )]
    UnknownCustomTypeInComparisonOperatorArgument {
        custom_type: Qualified<CustomTypeName>,
        operator_name: OperatorName,
        boolean_expression_type: Qualified<CustomTypeName>,
    },
    #[error("data connector {data_connector:} could not be found")]
    DataConnectorNotFound {
        data_connector: Qualified<DataConnectorName>,
    },
    #[error("scalar representations for data connector {data_connector:} could not be found")]
    DataConnectorScalarRepresentationsNotFound {
        data_connector: Qualified<DataConnectorName>,
    },
    #[error(
        "scalar type representation required for type {scalar_type:} in data connector {data_connector:}"
    )]
    DataConnectorScalarRepresentationRequired {
        data_connector: Qualified<DataConnectorName>,
        scalar_type: DataConnectorScalarType,
    },
    #[error("Predicate types in data connectors are unsupported")]
    PredicateTypesUnsupported,
    #[error("{0}")]
    GraphqlError(#[from] graphql_config::GraphqlConfigError),
}

impl ContextualError for ScalarBooleanExpressionTypeError {
    fn create_error_context(&self) -> Option<error_context::Context> {
        None
    }
}

View on GitHub (pinned to 724551b9ae)