{"record":{"id":"a5ec5d69e8afff99","repo":"hasura/graphql-engine","slug":"the-comparable-operator-name-is-defined-more-t","errorCode":null,"errorMessage":"the comparable operator '{name}' is defined more than once in the boolean expression type '{type_name}'","messagePattern":"the comparable operator '(.+?)' is defined more than once in the boolean expression type '(.+?)'","errorType":"validation","errorClass":"ScalarBooleanExpressionTypeIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs","lineNumber":95,"sourceCode":"    MissingIsNullOperatorNameInGraphqlConfig {\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"the boolean expression '{type_name}' has enabled logical operators, but they will not appear in the GraphQL API unless you update your CompatibilityConfig date to at least 2024-11-26\"\n    )]\n    LogicalOperatorsUnavailable {\n        type_name: Qualified<CustomTypeName>,\n    },\n    #[error(\n        \"the boolean expression '{type_name}' has a GraphQL field name conflict between the '{name}' {name_source_1} and the '{name}' {name_source_2}. One of these will need to be renamed.\"\n    )]\n    GraphqlFieldNameConflict {\n        type_name: Qualified<CustomTypeName>,\n        name: String,\n        name_source_1: FieldNameSource,\n        name_source_2: FieldNameSource,\n    },\n    #[error(\n        \"the comparable operator '{name}' is defined more than once in the boolean expression type '{type_name}'\"\n    )]\n    DuplicateComparableOperatorFound {\n        type_name: Qualified<CustomTypeName>,\n        name: OperatorName,\n    },\n    #[error(\"{0}\")]\n    OperatorIssue(ScalarBooleanExpressionOperatorIssue),\n}\n\nimpl ShouldBeAnError for ScalarBooleanExpressionTypeIssue {\n    fn should_be_an_error(&self, flags: &flags::OpenDdFlags) -> bool {\n        match self {\n            ScalarBooleanExpressionTypeIssue::MissingLogicalOperatorNamesInGraphqlConfig {\n                ..\n            }\n            | ScalarBooleanExpressionTypeIssue::MissingIsNullOperatorNameInGraphqlConfig {\n                ..","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs#L77-L113","documentation":"The same comparable operator name is defined more than once within a single boolean expression type.","triggerScenarios":"Declaring two comparable operators with identical OperatorName in one boolean expression type definition.","commonSituations":"Copy-pasting operator entries in metadata YAML and forgetting to change the name; merging type definitions that both define e.g. 'equal'.","solutions":["Remove or rename the duplicated operator entry so each operator name is unique within the type","Check for accidental merge of two boolean expression definitions with overlapping operators"],"exampleFix":"// before\noperators:\n  - name: equal\n  - name: equal\n// after\noperators:\n  - name: equal\n  - name: less_than","handlingStrategy":"validation","validationCode":"let mut names = HashSet::new();\nfor op in &be_type.comparable_operators {\n    if !names.insert(op.name.clone()) {\n        return Err(format!(\"duplicate operator: {}\", op.name));\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Lint metadata for duplicate operator names in CI","Avoid copy-pasting operator entries without editing the name"],"tags":["duplicate","operator","boolean-expression","metadata"],"backgroundTag":"duplicate-definition","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}