{"record":{"id":"6b462ffb0b1fca78","repo":"hasura/graphql-engine","slug":"multiple-type-representations-defined-for-scalar","errorCode":null,"errorMessage":"multiple type representations defined for scalar {scalar_type:} from data connector {data_connector:}","messagePattern":"multiple type representations defined for scalar (.+?) from data connector (.+?)","errorType":"validation","errorClass":"DataConnectorScalarTypesError::DuplicateDataConnectorScalarRepresentation","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/data_connector_scalar_types/error.rs","lineNumber":18,"sourceCode":"use open_dds::types::CustomTypeName;\n\nuse open_dds::data_connector::{DataConnectorName, DataConnectorScalarType};\n\nuse crate::types::error::ContextualError;\nuse crate::types::subgraph::Qualified;\n\nuse crate::stages::{graphql_config, scalar_boolean_expressions};\n\nimpl ContextualError for DataConnectorScalarTypesError {\n    fn create_error_context(&self) -> Option<error_context::Context> {\n        None\n    }\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum DataConnectorScalarTypesError {\n    #[error(\n        \"multiple type representations defined for scalar {scalar_type:} from data connector {data_connector:}\"\n    )]\n    DuplicateDataConnectorScalarRepresentation {\n        data_connector: Qualified<DataConnectorName>,\n        scalar_type: DataConnectorScalarType,\n    },\n    #[error(\"unknown type represented for scalar type {scalar_type:}: {type_name:}\")]\n    ScalarTypeUnknownRepresentation {\n        scalar_type: DataConnectorScalarType,\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\"{0}\")]\n    GraphqlConfigError(#[from] graphql_config::GraphqlConfigError),\n    #[error(\"{0}\")]\n    ScalarBooleanExpressionTypeError(\n        #[from] scalar_boolean_expressions::ScalarBooleanExpressionTypeError,\n    ),\n}","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/data_connector_scalar_types/error.rs#L1-L36","documentation":"A data connector scalar type has multiple conflicting type representations defined in metadata. Only one representation per (connector, scalar) pair is allowed so the scalar's GraphQL/SQL mapping is unambiguous.","triggerScenarios":"Defining the same DataConnectorScalarType with more than one type representation under the same data connector.","commonSituations":"Merging metadata files that both define the same connector scalar with different representations; copy-paste of scalar blocks.","solutions":["Find duplicate scalar definitions for the connector","Keep exactly one representation and delete or merge the others","Rebuild metadata"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Key scalar representations by (connector, scalar) and assert no duplicates\nlet mut seen = HashSet::new();\nfor (conn, scalar, _repr) in reps { assert!(seen.insert((conn, scalar))); }","typeGuard":null,"tryCatchPattern":"Catch DuplicateDataConnectorScalarRepresentation and report the connector/scalar pair.","preventionTips":["Keep scalar definitions in one place per connector","Lint for duplicate scalar blocks when merging metadata"],"tags":["scalar-types","data-connector","duplicate","metadata"],"backgroundTag":"duplicate-definition","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}