hasura/graphql-engine · error · DataConnectorScalarTypesError::ScalarTypeUnknownRepresentation

unknown type represented for scalar type {scalar_type:}: {ty

Error message

unknown type represented for scalar type {scalar_type:}: {type_name:}

What it means

A scalar type from a data connector references a custom type name (via its representation) that is not defined anywhere in metadata, so its representation cannot be resolved.

Source

Thrown at v3/crates/metadata-resolve/src/stages/data_connector_scalar_types/error.rs:25

use crate::stages::{graphql_config, scalar_boolean_expressions};

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

#[derive(Debug, thiserror::Error)]
pub enum DataConnectorScalarTypesError {
    #[error(
        "multiple type representations defined for scalar {scalar_type:} from data connector {data_connector:}"
    )]
    DuplicateDataConnectorScalarRepresentation {
        data_connector: Qualified<DataConnectorName>,
        scalar_type: DataConnectorScalarType,
    },
    #[error("unknown type represented for scalar type {scalar_type:}: {type_name:}")]
    ScalarTypeUnknownRepresentation {
        scalar_type: DataConnectorScalarType,
        type_name: Qualified<CustomTypeName>,
    },
    #[error("{0}")]
    GraphqlConfigError(#[from] graphql_config::GraphqlConfigError),
    #[error("{0}")]
    ScalarBooleanExpressionTypeError(
        #[from] scalar_boolean_expressions::ScalarBooleanExpressionTypeError,
    ),
}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Define the missing custom type referenced by the scalar representation
  2. Or change the scalar's representation to a built-in type
  3. Rebuild
Defensive patterns

Strategy: validation

Validate before calling

// Ensure referenced custom type names exist
for name in referenced_custom_types { assert!(type_defs.contains(name)); }

Try / catch

Catch ScalarTypeUnknownRepresentation and add the missing type or switch to a built-in representation.

Prevention

When it happens

Trigger: A connector scalar's type representation points at a CustomTypeName that has no corresponding type definition in the metadata.

Common situations: Removing a custom type while a connector scalar still references it; partial metadata imports.

Related errors


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