|
1 | 1 | /* @flow */ |
2 | 2 | /* eslint-disable no-param-reassign */ |
3 | 3 |
|
4 | | -import { TypeComposer, graphql } from 'graphql-compose'; |
| 4 | +import { TypeComposer } from 'graphql-compose'; |
| 5 | +import { GraphQLSchema, GraphQLList, graphql } from 'graphql-compose/lib/graphql'; |
5 | 6 | import { composeWithConnection } from '../composeWithConnection'; |
6 | 7 | import { userTypeComposer, sortOptions } from '../__mocks__/userTypeComposer'; |
7 | 8 | import { rootQueryTypeComposer as rootQueryTC } from '../__mocks__/rootQueryTypeComposer'; |
8 | 9 |
|
9 | | -const { GraphQLSchema, GraphQLList } = graphql; |
10 | | - |
11 | 10 | describe('composeWithRelay', () => { |
12 | 11 | const userComposer = composeWithConnection(userTypeComposer, { |
13 | 12 | countResolverName: 'count', |
@@ -94,7 +93,7 @@ describe('composeWithRelay', () => { |
94 | 93 | } |
95 | 94 | } |
96 | 95 | }`; |
97 | | - const result = await graphql.graphql(schema, query); |
| 96 | + const result = await graphql(schema, query); |
98 | 97 |
|
99 | 98 | // $FlowFixMe |
100 | 99 | expect(result.data.userConnection).toEqual({ |
@@ -149,7 +148,7 @@ describe('composeWithRelay', () => { |
149 | 148 | } |
150 | 149 | } |
151 | 150 | }`; |
152 | | - const result = await graphql.graphql(schema, query); |
| 151 | + const result = await graphql(schema, query); |
153 | 152 |
|
154 | 153 | // $FlowFixMe |
155 | 154 | expect(result.data.userConnection).toEqual({ |
@@ -214,7 +213,7 @@ describe('composeWithRelay', () => { |
214 | 213 | gender |
215 | 214 | } |
216 | 215 | `; |
217 | | - const result = await graphql.graphql(schema, query); |
| 216 | + const result = await graphql(schema, query); |
218 | 217 | expect(result).toEqual({ |
219 | 218 | data: { |
220 | 219 | userConnection: { |
@@ -264,7 +263,7 @@ describe('composeWithRelay', () => { |
264 | 263 | count |
265 | 264 | } |
266 | 265 | }`; |
267 | | - await graphql.graphql(schema, query); |
| 266 | + await graphql(schema, query); |
268 | 267 | // $FlowFixMe |
269 | 268 | expect(Object.keys(topResolveParams.countResolveParams)).toEqual( |
270 | 269 | expect.arrayContaining(['source', 'args', 'context', 'info', 'projection']) |
@@ -297,7 +296,7 @@ describe('composeWithRelay', () => { |
297 | 296 | count |
298 | 297 | } |
299 | 298 | }`; |
300 | | - await graphql.graphql(schema, query); |
| 299 | + await graphql(schema, query); |
301 | 300 | // $FlowFixMe |
302 | 301 | expect(Object.keys(topResolveParams.findManyResolveParams)).toEqual( |
303 | 302 | expect.arrayContaining(['source', 'args', 'context', 'info', 'projection']) |
|
0 commit comments