(q schema.Query)
| 58 | } |
| 59 | |
| 60 | func 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 | } |
no test coverage detected
searching dependent graphs…