We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3a2a57 commit 02a6a41Copy full SHA for 02a6a41
src/__tests__/mutations.tests.ts
@@ -4,6 +4,23 @@ import { jsonToGraphQLQuery } from '../';
4
5
describe('jsonToGraphQLQuery() - mutations', () => {
6
7
+ it('simple mutation', () => {
8
+ const mutation = {
9
+ mutation: {
10
+ delete_post: {
11
+ __args: { id: 1234 },
12
+ id: true,
13
+ }
14
15
16
+ expect(jsonToGraphQLQuery(mutation, { pretty: true })).to.equal(
17
+ `mutation {
18
+ delete_post (id: 1234) {
19
+ id
20
21
+}`);
22
+ })
23
+
24
it('correctly converts mutations with no specified return fields', () => {
25
const query = {
26
mutation: {
0 commit comments