hasura/graphql-engine · error · ScalarBooleanExpressionTypeError

cannot find scalar type {scalar_type:} in data connector {da

Error message

cannot find scalar type {scalar_type:} in data connector {data_connector:}

What it means

While resolving scalar boolean expressions, the referenced data connector exists but does not expose the named scalar type (DataConnectorScalarType). The connector's capabilities/scalar type list has no entry matching the representation, so the resolver cannot generate comparison expressions for it.

Source

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

use crate::types::error::ContextualError;
use crate::{Qualified, QualifiedTypeName, QualifiedTypeReference};
use crate::{stages::graphql_config, types::error::ShouldBeAnError};
use open_dds::flags;
use open_dds::{
    data_connector::{DataConnectorName, DataConnectorScalarType},
    types::{CustomTypeName, OperatorName},
};

#[derive(Debug, thiserror::Error)]
pub enum ScalarBooleanExpressionTypeError {
    #[error(
        "unknown data connector {data_connector:} referenced in scalar type representation of {scalar_type:}"
    )]
    ScalarTypeFromUnknownDataConnector {
        data_connector: Qualified<DataConnectorName>,
        scalar_type: DataConnectorScalarType,
    },
    #[error("cannot find scalar type {scalar_type:} in data connector {data_connector:}")]
    UnknownScalarTypeInDataConnector {
        data_connector: Qualified<DataConnectorName>,
        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 {

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Compare the scalar name in the error with the connector's documented capabilities and fix casing/spelling
  2. Refresh connector capabilities (re-run the connector capability fetch) so the resolver sees the current scalar list
  3. If the connector genuinely lacks the type, map the representation to a supported scalar or drop it

Example fix

# before
- scalarType: Timestamp
  dataConnectorScalarType: timestamp   # connector reports 'timestamptz'
# after
- scalarType: Timestamp
  dataConnectorScalarType: timestamptz
Defensive patterns

Strategy: validation

Validate before calling

fn check_connector_scalar(
    connector_scalars: &BTreeSet<DataConnectorScalarType>,
    s: &DataConnectorScalarType,
) -> Result<(), String> {
    if connector_scalars.contains(s) { Ok(()) } else { Err(format!("scalar {s:?} not offered by connector")) }
}

Try / catch

catch UnknownScalarTypeInDataConnector and print the connector's actual scalar list alongside the requested name

Prevention

When it happens

Trigger: A scalar type representation names a connector scalar (e.g. 'uuid' vs 'UUID', or a type the connector driver doesn't support) that isn't in the connector's reported scalar types; version skew between connector capabilities files and metadata.

Common situations: Case-mismatched scalar names between metadata and connector capabilities; switching data connectors (e.g. Postgres to Mongo) without updating scalar representations; stale cached capabilities after a connector upgrade changes supported scalars.

Related errors


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