(t *testing.T, query string, operation ...string)
| 54 | } |
| 55 | |
| 56 | func graphQLBody(t *testing.T, query string, operation ...string) string { |
| 57 | t.Helper() |
| 58 | payload := map[string]string{"query": query} |
| 59 | if len(operation) > 0 { |
| 60 | payload["operationName"] = operation[0] |
| 61 | } |
| 62 | data, err := json.Marshal(payload) |
| 63 | require.NoError(t, err) |
| 64 | return string(data) |
| 65 | } |
| 66 | |
| 67 | func graphQLBodyWithVariables(t *testing.T, query, variables string) string { |
| 68 | t.Helper() |
no test coverage detected