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 22cd8c3 commit 58f4377Copy full SHA for 58f4377
1 file changed
tests/graphql.spec.ts
@@ -197,6 +197,34 @@ describe('topologicalSortAST', () => {
197
expect(sortedSchema).toBe(expectedSortedSchema);
198
});
199
200
+ it('should place interface definitions before types that depend on them', () => {
201
+ const schema = /* GraphQL */ `
202
+ type A {
203
+ id: ID!
204
+ node: Node
205
+ }
206
+
207
+ interface Node {
208
209
210
+ `;
211
212
+ const sortedSchema = getSortedSchema(schema);
213
214
+ const expectedSortedSchema = dedent/* GraphQL */`
215
216
217
218
219
220
221
222
223
224
225
+ expect(sortedSchema).toBe(expectedSortedSchema);
226
+ });
227
228
it('should correctly handle schema with circular dependencies', () => {
229
const schema = /* GraphQL */ `
230
input A {
0 commit comments