{"record":{"id":"070514b2cd163cf8","repo":"hasura/graphql-engine","slug":"multiple-operator-name-operators-found-for-type","errorCode":null,"errorMessage":"Multiple {operator_name} operators found for type {scalar_type} in data connector {data_connector_name}","messagePattern":"Multiple (.+?) operators found for type (.+?) in data connector (.+?)","errorType":"validation","errorClass":"ObjectTypesIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/object_types/types.rs","lineNumber":442,"sourceCode":"    pub day_of_week_function: Option<DataConnectorExtractionFunctionName>,\n    pub day_of_year_function: Option<DataConnectorExtractionFunctionName>,\n    pub other_functions: Vec<DataConnectorExtractionFunctionName>,\n}\n\n/// Mapping from an object to their fields, which contain types.\n#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, Eq)]\npub enum TypeMapping {\n    /// Mapping from an object to their fields, which contain the types of fields.\n    Object {\n        ndc_object_type_name: DataConnectorObjectType,\n        field_mappings: Arc<BTreeMap<FieldName, FieldMapping>>,\n    },\n}\n\n#[allow(clippy::enum_variant_names)]\n#[derive(Debug, thiserror::Error)]\npub enum ObjectTypesIssue {\n    #[error(\n        \"Multiple {operator_name} operators found for type {scalar_type} in data connector {data_connector_name}\"\n    )]\n    DuplicateOperatorsDefined {\n        scalar_type: ndc_models::ScalarTypeName,\n        operator_name: String,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"Multiple {function_name} aggregate functions found for type {scalar_type} in data connector {data_connector_name}\"\n    )]\n    DuplicateAggregateFunctionsDefined {\n        scalar_type: ndc_models::ScalarTypeName,\n        function_name: String,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"Multiple {function_name} extraction functions found for type {scalar_type} in data connector {data_connector_name}\"\n    )]","sourceCodeStart":424,"sourceCodeEnd":460,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/object_types/types.rs#L424-L460","documentation":"The connector's schema (or generated operator collections) declares more than one comparison operator with the same operator_name for the same scalar type. The resolver requires operator names to be unique per (scalar type, data connector) so it can pick a deterministic operator.","triggerScenarios":"Loading a connector schema that lists the same operator name twice for one scalar type, or metadata that defines duplicate comparison operator entries for a type in one connector.","commonSituations":"Manually adding a comparison operator that already exists in the connector's defaults; merging metadata files that both define the same operator; connector bug emitting duplicate operator entries.","solutions":["Inspect the operator collection in metadata/connector schema for the named scalar type and remove the duplicate entry","If the duplicate comes from the connector itself, upgrade or patch the connector so its schema does not repeat operator names","Regenerate the operator collection rather than hand-appending to it"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// De-duplicate operators per (scalar_type, operator_name, connector) before serializing metadata\nconst seen = new Set();\nfor (const op of operators) {\n  const key = `${op.scalar_type}/${op.operator_name}`;\n  if (seen.has(key)) throw new Error(`Duplicate operator ${key}`);\n  seen.add(key);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Generate operator collections programmatically and assert uniqueness","Avoid hand-appending operators that may already come from the connector"],"tags":["hasura","metadata","data-connectors","operators","duplicate"],"backgroundTag":"duplicate-definition","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}