{"record":{"id":"2315060c2be21725","repo":"hasura/graphql-engine","slug":"the-argument-type-argument-type-for-the-operat","errorCode":null,"errorMessage":"the argument type '{argument_type}' for the operator '{operator_name}' in the boolean expression '{type_name}' should be a list","messagePattern":"the argument type '(.+?)' for the operator '(.+?)' in the boolean expression '(.+?)' should be a list","errorType":"validation","errorClass":"ScalarBooleanExpressionOperatorIssue","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs","lineNumber":138,"sourceCode":"            ScalarBooleanExpressionTypeIssue::OperatorIssue(issue) => {\n                issue.should_be_an_error(flags)\n            }\n        }\n    }\n}\n\n#[derive(Debug, thiserror::Error)]\npub 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}\"","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs#L120-L156","documentation":"For operators that take multiple arguments (like _in), the declared argument type must be a list, but the metadata declares a non-list type.","triggerScenarios":"Defining an operator such as 'in' whose argument type in the boolean expression type is a scalar (or otherwise non-list) QualifiedTypeReference.","commonSituations":"Hand-writing boolean expression operators and forgetting the array wrapper for list-based operators.","solutions":["Wrap the argument type in a list, e.g. use the array/list form of the type reference","Model the argument on built-in boolean expression types which use lists for in-style operators"],"exampleFix":"// before\nargument_type: {scalar: my_scalar}\n// after\nargument_type: {list: {scalar: my_scalar}}","handlingStrategy":"validation","validationCode":"if operator.expects_list_argument && !argument_type.is_list() {\n    return Err(\"argument type should be a list\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Mirror built-in boolean expression types when authoring list-taking operators"],"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"}