{"record":{"id":"9be1fa9d313f6acd","repo":"hasura/graphql-engine","slug":"the-argument-type-argument-type-for-the-operat-9be1fa","errorCode":null,"errorMessage":"the argument type '{argument_type}' for the operator '{operator_name}' in the boolean expression '{type_name}' should match the scalar type '{scalar_type}'","messagePattern":"the argument type '(.+?)' for the operator '(.+?)' in the boolean expression '(.+?)' should match the scalar type '(.+?)'","errorType":"validation","errorClass":"ScalarBooleanExpressionOperatorIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs","lineNumber":146,"sourceCode":"pub enum ScalarBooleanExpressionOperatorIssue {\n    #[error(\n        \"The operator '{operator_name}' is mapped to '{mapped_operator_name}' for the data connector '{data_connector_name}' in the boolean expression '{type_name}', but the mapped operator is not found in the data connector.\"\n    )]\n    MappedOperatorNotFound {\n        type_name: Qualified<CustomTypeName>,\n        operator_name: OperatorName,\n        mapped_operator_name: ndc_models::ComparisonOperatorName,\n        data_connector_name: Qualified<DataConnectorName>,\n    },\n    #[error(\n        \"the argument type '{argument_type}' for the operator '{operator_name}' in the boolean expression '{type_name}' should be a list\"\n    )]\n    ArgumentTypeShouldBeList {\n        type_name: Qualified<CustomTypeName>,\n        operator_name: OperatorName,\n        argument_type: QualifiedTypeReference,\n    },\n    #[error(\n        \"the argument type '{argument_type}' for the operator '{operator_name}' in the boolean expression '{type_name}' should match the scalar type '{scalar_type}'\"\n    )]\n    ArgumentTypeShouldMatchScalar {\n        type_name: Qualified<CustomTypeName>,\n        operator_name: OperatorName,\n        argument_type: QualifiedTypeReference,\n        scalar_type: QualifiedTypeName,\n    },\n    #[error(\n        \"the argument type for the operator '{operator_name}' in the boolean expression '{type_name}' is not compatible with the mapped operator's argument type defined in the data connector: {issue}\"\n    )]\n    ArgumentTypeMismatch {\n        type_name: Qualified<CustomTypeName>,\n        operator_name: OperatorName,\n        issue: type_validation::TypeCompatibilityIssue,\n    },\n    #[error(\n        \"the operator '{operator_name}' in the boolean expression '{type_name}' is only applicable on string scalars: {reason}\"","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs#L128-L164","documentation":"The operator's argument type must match the scalar type the boolean expression is defined on, but a different type is declared.","triggerScenarios":"Declaring an operator on a boolean expression type for scalar T whose argument type references a different scalar type U.","commonSituations":"Copy-pasting an operator definition between boolean expression types for different scalar types without updating the argument type.","solutions":["Change the operator's argument type to the same scalar type the boolean expression is defined over","If a different argument type is genuinely needed, verify the operator semantics support it"],"exampleFix":"// before\n# boolean expression on scalar UUID\nargument_type: {scalar: String}\n// after\nargument_type: {scalar: UUID}","handlingStrategy":"validation","validationCode":"if &operator.argument_type.underlying_type() != be_type.scalar_type() {\n    return Err(\"argument type must match the boolean expression scalar type\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When copying operator definitions between types, update argument types too"],"tags":["type-mismatch","operator","boolean-expression","metadata"],"backgroundTag":"argument-type-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}