MCPcopy Create free account
hub / github.com/github/docs / getArguments

Function getArguments

src/graphql/scripts/utils/schema-helpers.js:19–39  ·  view source on GitHub ↗
(args, schema)

Source from the content-addressed store, hash-verified

17}
18
19async function getArguments(args, schema) {
20 if (!args.length) return
21
22 const newArgs = []
23
24 for (const arg of args) {
25 const newArg = {}
26 const type = {}
27 newArg.name = arg.name.value
28 newArg.defaultValue = arg.defaultValue ? arg.defaultValue.value : undefined
29 newArg.description = await getDescription(arg.description.value)
30 type.name = getType(arg)
31 type.id = getId(type.name)
32 type.kind = getTypeKind(type.name, schema)
33 type.href = getFullLink(type.kind, type.id)
34 newArg.type = type
35 newArgs.push(newArg)
36 }
37
38 return newArgs
39}
40
41async function getDeprecationReason(directives, schemaMember) {
42 if (!schemaMember.isDeprecated) return

Callers

nothing calls this directly

Calls 5

getDescriptionFunction · 0.85
getTypeFunction · 0.85
getIdFunction · 0.85
getTypeKindFunction · 0.85
getFullLinkFunction · 0.85

Tested by

no test coverage detected