MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / getTaskInput

Function getTaskInput

graphql/admin/task.go:60–72  ·  view source on GitHub ↗
(q schema.Query)

Source from the content-addressed store, hash-verified

58}
59
60func getTaskInput(q schema.Query) (*taskInput, error) {
61 inputArg := q.ArgValue(schema.InputArgName)
62 inputBytes, err := json.Marshal(inputArg)
63 if err != nil {
64 return nil, schema.GQLWrapf(err, "couldn't get input argument")
65 }
66
67 var input taskInput
68 if err := json.Unmarshal(inputBytes, &input); err != nil {
69 return nil, schema.GQLWrapf(err, "couldn't get input argument")
70 }
71 return &input, nil
72}

Callers 1

resolveTaskFunction · 0.85

Calls 2

GQLWrapfFunction · 0.92
ArgValueMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…