{"record":{"id":"ad0965cc67a7cbf5","repo":"dgraph-io/dgraph","slug":"list-value-supplied-for-argument-s-in-s-s","errorCode":null,"errorMessage":"LIST value supplied for argument `%s` in %s `%s`, but remote argument doesn't accept LIST.","messagePattern":"LIST value supplied for argument `(.+?)` in (.+?) `(.+?)`, but remote argument doesn't accept LIST\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"graphql/schema/remote.go","lineNumber":475,"sourceCode":"\t\t\tif !ok {\n\t\t\t\treturn missingRemoteTypeError(remoteObjTypname)\n\t\t\t}\n\t\t\tif err := matchArgSignature(&argMatchingMetadata{\n\t\t\t\tgivenArgVals:  getObjChildrenValsAsMap(givenArgVal),\n\t\t\t\tgivenVarTypes: md.givenVarTypes,\n\t\t\t\tremoteArgMd:   getRemoteTypeFieldsMetadata(remoteObjTyp),\n\t\t\t\tremoteTypes:   md.remoteTypes,\n\t\t\t\tgivenQryName:  md.givenQryName,\n\t\t\t\toperationType: md.operationType,\n\t\t\t\tschema:        md.schema,\n\t\t\t}); err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\tcase ast.ListValue:\n\t\t\tif !((remoteArgTyp.Kind == list && remoteArgTyp.OfType != nil) || (remoteArgTyp.\n\t\t\t\tKind == nonNull && remoteArgTyp.OfType != nil && remoteArgTyp.OfType.\n\t\t\t\tKind == list && remoteArgTyp.OfType.OfType != nil)) {\n\t\t\t\treturn errors.Errorf(\"LIST value supplied for argument `%s` in %s `%s`, \"+\n\t\t\t\t\t\"but remote argument doesn't accept LIST.\", givenArgName, *md.operationType,\n\t\t\t\t\t*md.givenQryName)\n\t\t\t}\n\t\t\tremoteListElemTypname := remoteArgTyp.NamedType()\n\t\t\tremoteObjTyp, ok := md.remoteTypes[remoteListElemTypname]\n\t\t\tif !ok {\n\t\t\t\treturn missingRemoteTypeError(remoteListElemTypname)\n\t\t\t}\n\t\t\tif remoteObjTyp.Kind != inputObject {\n\t\t\t\treturn errors.Errorf(\"argument `%s` in %s `%s` of List kind has non-object\"+\n\t\t\t\t\t\" elements in remote %s, Lists can have only INPUT_OBJECT as element.\",\n\t\t\t\t\tgivenArgName, *md.operationType, *md.givenQryName, *md.operationType)\n\t\t\t}\n\t\t\tremoteObjChildMap := getRemoteTypeFieldsMetadata(remoteObjTyp)\n\t\t\tfor _, givenElem := range givenArgVal.Children {\n\t\t\t\tif givenElem.Value.Kind != ast.ObjectValue {\n\t\t\t\t\treturn errors.Errorf(\"argument `%s` in %s `%s` of List kind has non-object\"+\n\t\t\t\t\t\t\" elements, Lists can have only objects as element.\", givenArgName,","sourceCodeStart":457,"sourceCodeEnd":493,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/graphql/schema/remote.go#L457-L493","documentation":"When an argument is supplied as a GraphQL list literal (ast.ListValue), matchArgSignature verifies the remote argument type is a LIST (with a defined element type), either bare or NonNull-wrapped. If the remote argument does not accept a list, this error is thrown so an incompatible list value is never forwarded upstream.","triggerScenarios":"validateRemoteGraphql -> matchArgSignature on a query like `query { f(ids: [\"a\",\"b\"]) }` where the remote argument `ids` is a scalar, INPUT_OBJECT, or enum rather than a List (or the List has no element type / NonNull-wrapped form lacks a nested type).","commonSituations":"Client sends an array where the remote now expects a single value (or vice versa) after an API change; wrong field/remote targeted; stale cached remote schema.","solutions":["Send a single (non-list) value matching the remote argument type instead of a list.","Update the remote SDL so the argument is declared as a list (e.g. `[Int!]`) if list input is intended.","Check that you are validating against the correct remote operation; kind mismatches often indicate a name collision.","Re-introspect and refresh the stored remote schema."],"exampleFix":"// before (remote arg: id: ID!)\nquery { user(ids: [\"1\"]) }\n// after\nquery { user(ids: \"1\") }","handlingStrategy":"validation","validationCode":"// Ensure list literals target LIST args\nif valueKind == \"ListValue\" && !isListAccepting(argType) {\n    return fmt.Errorf(\"arg %s is not a LIST on remote\", argName)\n}\n\nfunc isListAccepting(t *ast.Type) bool {\n    return (t.Kind == list && t.OfType != nil) ||\n        (t.Kind == nonNull && t.OfType != nil && t.OfType.Kind == list && t.OfType.OfType != nil)\n}","typeGuard":"func isListArg(t *ast.Type) bool { return isListAccepting(t) }","tryCatchPattern":"if err := validateRemoteGraphql(...); err != nil {\n    if strings.Contains(err.Error(), \"doesn't accept LIST\") {\n        return fmt.Errorf(\"send single value or fix remote SDL: %w\", err)\n    }\n    return err\n}","preventionTips":["Check remote argument kind before sending arrays","Re-sync remote schema after API version changes","Use generated typed clients to catch list/single mismatches at build time"],"tags":["graphql","arguments","list"],"backgroundTag":"graphql-argument-kind-mismatch","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}