GetMutation gets a single schema.Mutation from a schema.Operation. It will fail if op is not a mutation or there's more than one mutation in op.
(t *testing.T, op schema.Operation)
| 60 | // It will fail if op is not a mutation or there's more than one mutation in |
| 61 | // op. |
| 62 | func GetMutation(t *testing.T, op schema.Operation) schema.Mutation { |
| 63 | require.NotNil(t, op) |
| 64 | |
| 65 | mutations := op.Mutations() |
| 66 | require.Len(t, mutations, 1) |
| 67 | |
| 68 | return mutations[0] |
| 69 | } |
| 70 | |
| 71 | // GetQuery gets a single schema.Query from a schema.Operation. |
| 72 | // It will fail if op is not a query or there's more than one query in |