{"record":{"id":"5fc3a99043d13d55","repo":"dgraph-io/dgraph","slug":"argument-s-is-not-present-in-remote-s-s","errorCode":null,"errorMessage":"argument `%s` is not present in remote %s `%s`.","messagePattern":"argument `(.+?)` is not present in remote (.+?) `(.+?)`\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"graphql/schema/remote.go","lineNumber":418,"sourceCode":"\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// matchArgSignature matches the type signature for arguments supplied in metadata with\n// corresponding remote arguments\nfunc matchArgSignature(md *argMatchingMetadata) error {\n\t// TODO: maybe add path information in error messages,\n\t// so they are more informative. Like if query was `query { userNames(car: {age: $var}) }`,\n\t// then for errors on `age`, we shouldn't just be putting `age` in error messages,\n\t// instead we should put `car.age`\n\tfor givenArgName, givenArgVal := range md.givenArgVals {\n\t\tremoteArgTyp, ok := md.remoteArgMd.typMap[givenArgName]\n\t\tif !ok {\n\t\t\treturn errors.Errorf(\"argument `%s` is not present in remote %s `%s`.\",\n\t\t\t\tgivenArgName, *md.operationType, *md.givenQryName)\n\t\t}\n\n\t\tswitch givenArgVal.Kind {\n\t\tcase ast.Variable:\n\t\t\tgivenArgTyp, ok := md.givenVarTypes[givenArgVal.Raw]\n\t\t\tif !ok {\n\t\t\t\treturn errors.Errorf(\"variable $%s is missing in given context.\", givenArgVal.Raw)\n\t\t\t}\n\t\t\t// TODO: we will consider ID as String for the purpose of type matching\n\t\t\t//rootType := givenArgTyp\n\t\t\t//for rootType.NamedType == \"\" {\n\t\t\t//\trootType = rootType.Elem\n\t\t\t//}\n\t\t\t//if rootType.NamedType == \"ID\" {\n\t\t\t//\trootType.NamedType = \"String\"\n\t\t\t//}\n\t\t\texpectedArgType := givenArgTyp.String()","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/dgraph-io/dgraph/blob/759e242be62c91f8d084da06ad0c8d21256d9c07/graphql/schema/remote.go#L400-L436","documentation":"matchArgSignature validates that every argument supplied in the local (given) query/mutation exists in the remote operation's argument set. If an argument name given in the query is absent from the remote field's argument metadata (typMap), this error is thrown. It prevents forwarding queries to the remote service with parameters the remote does not accept.","triggerScenarios":"Running remote schema validation (validateRemoteGraphql) where the composed/local query passes an argument (e.g. `car`) that the remote query/mutation field does not define, including nested object-value arguments checked recursively via matchArgSignature.","commonSituations":"Typo in an argument name in the local query; remote API removed or renamed an argument after an upgrade; argument defined only on the local schema and not forwarded to the remote; casing mismatch (age vs Age).","solutions":["Remove the offending argument from the local query or rename it to match the remote argument name exactly (check spelling and casing).","Introspect the remote schema for the target field and confirm the full argument list; update the local query/config accordingly.","If the remote recently changed, pin the remote schema version or update the stored remote SDL used by the composition.","If the argument belongs to a nested input object, ensure it exists on the remote INPUT_OBJECT type, not just the local one."],"exampleFix":"// before\nquery { userNames(car: {age: $var}) }\n// after (remote accepts `car` -> `{ age }`, typo removed)\nquery { userNames(car: {age: $var}) }  // if `car` itself is missing: query { userNames(age: $var) }","handlingStrategy":"validation","validationCode":"// Check args before composing\nfor name := range givenArgs {\n    if _, ok := remoteFieldArgs[name]; !ok {\n        return fmt.Errorf(\"arg %q not in remote field %s\", name, fieldName)\n    }\n}","typeGuard":"func argExists(remoteArgs map[string]*ast.ArgumentDefinition, name string) bool {\n    _, ok := remoteArgs[name]; return ok\n}","tryCatchPattern":"err := validateRemoteGraphql(...)\nif err != nil && strings.Contains(err.Error(), \"is not present in remote\") {\n    // log offending arg and abort composition; not retryable\n}","preventionTips":["Generate queries from the remote schema so argument names always match","Lint local queries with graphql-schema-linter against the remote SDL","Watch for argument renames in upstream changelogs","Match casing exactly"],"tags":["graphql","arguments","remote-schema"],"backgroundTag":"unknown-graphql-argument","analyzedSha":"759e242be62c91f8d084da06ad0c8d21256d9c07","analyzedAt":"2026-09-01T14:42:12.034Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}