Skip to content

Commit 178b77a

Browse files
committed
full inline fragments test
1 parent 26fa120 commit 178b77a

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/__tests__/fragments.tests.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,17 @@ describe('jsonToGraphQLQuery() - fragments', () => {
5858
);
5959
});
6060

61+
it('supports full inline fragments', () => {
62+
const query = {
63+
query: {
64+
Posts: {
65+
__on: 'ConfigurablePost'
66+
}
67+
}
68+
};
69+
expect(jsonToGraphQLQuery(query)).to.equal(
70+
'query { Posts { ... ConfigurablePost } }'
71+
);
72+
});
73+
6174
});

0 commit comments

Comments
 (0)