{"record":{"id":"5fbc9f1c2fff50dc","repo":"hasura/graphql-engine","slug":"cannot-find-scalar-type-scalar-type-in-data-con","errorCode":null,"errorMessage":"cannot find scalar type {scalar_type:} in data connector {data_connector:}","messagePattern":"cannot find scalar type (.+?) in data connector (.+?)","errorType":"validation","errorClass":"ScalarBooleanExpressionTypeError","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs","lineNumber":20,"sourceCode":"use crate::types::error::ContextualError;\nuse crate::{Qualified, QualifiedTypeName, QualifiedTypeReference};\nuse crate::{stages::graphql_config, types::error::ShouldBeAnError};\nuse open_dds::flags;\nuse open_dds::{\n    data_connector::{DataConnectorName, DataConnectorScalarType},\n    types::{CustomTypeName, OperatorName},\n};\n\n#[derive(Debug, thiserror::Error)]\npub enum ScalarBooleanExpressionTypeError {\n    #[error(\n        \"unknown data connector {data_connector:} referenced in scalar type representation of {scalar_type:}\"\n    )]\n    ScalarTypeFromUnknownDataConnector {\n        data_connector: Qualified<DataConnectorName>,\n        scalar_type: DataConnectorScalarType,\n    },\n    #[error(\"cannot find scalar type {scalar_type:} in data connector {data_connector:}\")]\n    UnknownScalarTypeInDataConnector {\n        data_connector: Qualified<DataConnectorName>,\n        scalar_type: DataConnectorScalarType,\n    },\n    #[error(\n        \"cannot find type {custom_type:} when resolving arguments for comparison operator {operator_name:} for {boolean_expression_type:}\"\n    )]\n    UnknownCustomTypeInComparisonOperatorArgument {\n        custom_type: Qualified<CustomTypeName>,\n        operator_name: OperatorName,\n        boolean_expression_type: Qualified<CustomTypeName>,\n    },\n    #[error(\"data connector {data_connector:} could not be found\")]\n    DataConnectorNotFound {\n        data_connector: Qualified<DataConnectorName>,\n    },\n    #[error(\"scalar representations for data connector {data_connector:} could not be found\")]\n    DataConnectorScalarRepresentationsNotFound {","sourceCodeStart":2,"sourceCodeEnd":38,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs#L2-L38","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Compare the scalar name in the error with the connector's documented capabilities and fix casing/spelling","Refresh connector capabilities (re-run the connector capability fetch) so the resolver sees the current scalar list","If the connector genuinely lacks the type, map the representation to a supported scalar or drop it"],"exampleFix":"# before\n- scalarType: Timestamp\n  dataConnectorScalarType: timestamp   # connector reports 'timestamptz'\n# after\n- scalarType: Timestamp\n  dataConnectorScalarType: timestamptz","handlingStrategy":"validation","validationCode":"fn check_connector_scalar(\n    connector_scalars: &BTreeSet<DataConnectorScalarType>,\n    s: &DataConnectorScalarType,\n) -> Result<(), String> {\n    if connector_scalars.contains(s) { Ok(()) } else { Err(format!(\"scalar {s:?} not offered by connector\")) }\n}","typeGuard":null,"tryCatchPattern":"catch UnknownScalarTypeInDataConnector and print the connector's actual scalar list alongside the requested name","preventionTips":["Pin and refresh connector capabilities files when upgrading connectors","Verify scalar name casing against the connector docs when switching databases"],"tags":["data-connector","scalar-types","boolean-expressions","capabilities","hasura-ddn"],"backgroundTag":"connector-scalar-type-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}