{"record":{"id":"fbaaed42f0cee11e","repo":"hasura/graphql-engine","slug":"argument-type-argument-type-is-a-list","errorCode":null,"errorMessage":"argument type '{argument_type}' is a list","messagePattern":"argument type '(.+?)' is a list","errorType":"validation","errorClass":"StringOperatorReason","httpStatus":null,"severity":"error","filePath":"v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs","lineNumber":185,"sourceCode":"        type_name: Qualified<CustomTypeName>,\n        operator_name: OperatorName,\n        reason: StringOperatorReason,\n    },\n}\n\nimpl ShouldBeAnError for ScalarBooleanExpressionOperatorIssue {\n    fn should_be_an_error(&self, flags: &flags::OpenDdFlags) -> bool {\n        flags.contains(flags::Flag::ValidateScalarBooleanExpressionOperators)\n    }\n}\n\n#[derive(Debug, thiserror::Error)]\npub enum StringOperatorReason {\n    #[error(\"scalar type '{scalar_type}' is not a string\")]\n    ScalarTypeNotString { scalar_type: QualifiedTypeName },\n    #[error(\"argument type '{argument_type}' is not a string\")]\n    ArgumentTypeNotString { argument_type: QualifiedTypeName },\n    #[error(\"argument type '{argument_type}' is a list\")]\n    ArgumentTypeShouldNotBeList {\n        argument_type: QualifiedTypeReference,\n    },\n}\n\n#[derive(Debug, Eq, PartialEq, Copy, Clone, derive_more::with_trait::Display)]\n#[allow(clippy::enum_variant_names)] // It's fine that they all end with \"Operator\" :/\npub enum FieldNameSource {\n    #[display(\"comparable operator\")]\n    ComparisonOperator,\n    #[display(\"logical operator\")]\n    LogicalOperator,\n    #[display(\"is null operator\")]\n    IsNullOperator,\n}\n","sourceCodeStart":167,"sourceCodeEnd":201,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/v3/crates/metadata-resolve/src/stages/scalar_boolean_expressions/error.rs#L167-L201","documentation":"Nested reason for OnlyApplicableOnStringScalar: the string operator's argument type is a list, but string operator arguments must be single string values.","triggerScenarios":"Declaring a string operator (like/ilike) whose argument type is wrapped in a list.","commonSituations":"Copy-pasting list-style argument types from in-style operators onto string operators.","solutions":["Remove the list wrapper from the string operator's argument type"],"exampleFix":"// before\nargument_type: {list: {scalar: String}}\n// after\nargument_type: {scalar: String}","handlingStrategy":"validation","validationCode":"if operator.is_string_only() && argument_type.is_list() {\n    return Err(\"string operator argument must not be a list\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Do not reuse list argument shapes from in-style operators for string operators"],"tags":["type-mismatch","string-operator","list","metadata"],"backgroundTag":"argument-type-mismatch","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}