hasura/graphql-engine · error · ScalarBooleanExpressionTypeError

unknown data connector {data_connector:} referenced in scala

Error message

unknown data connector {data_connector:} referenced in scalar type representation of {scalar_type:}

What it means

The scalar boolean expressions stage resolves comparison operator input types against data connector scalar types. This error fires when the metadata references a Qualified<DataConnectorName> that is not present in the resolved data connectors subgraph — i.e. the connector backing a scalar type representation was never defined or has a different name/namespace.

Source

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

use crate::helpers::type_validation;
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>,

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Grep metadata for the data connector name from the error and align it with the actual connector definition
  2. Ensure the data connector is defined in the same subgraph/namespace used in the reference
  3. If the connector was renamed, update the scalar representation to the new qualified name

Example fix

# before
scalarRepresentations:
  - scalarType: UUID
    dataConnectorName: default/postgres_v1   # connector is 'default/postgres'
# after
scalarRepresentations:
  - scalarType: UUID
    dataConnectorName: default/postgres
Defensive patterns

Strategy: validation

Validate before calling

fn check_connector_refs(
    connectors: &BTreeSet<Qualified<DataConnectorName>>,
    refs: &[Qualified<DataConnectorName>],
) -> Result<(), String> {
    for r in refs {
        if !connectors.contains(r) { return Err(format!("unknown data connector: {r}")); }
    }
    Ok(())
}

Try / catch

downcast ScalarTypeFromUnknownDataConnector and echo the connector + scalar type so the operator can grep metadata

Prevention

When it happens

Trigger: A scalar type's connector representation (or boolean expression operator config) references a data connector name/subgraph combination that doesn't exist in the metadata; typical after renaming a data connector, moving it between namespaces, or omitting its definition file.

Common situations: Renaming a data connector without updating all scalar representations referencing it; building a subset of metadata files that excludes the connector definition; namespace typos in the qualified name.

Related errors


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