|
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 { composeWithPagination } from '../composeWithPagination'; |
6 | 7 | import { userTypeComposer } 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 = composeWithPagination(userTypeComposer, { |
13 | 12 | countResolverName: 'count', |
@@ -100,7 +99,7 @@ describe('composeWithRelay', () => { |
100 | 99 | gender |
101 | 100 | } |
102 | 101 | `; |
103 | | - const result = await graphql.graphql(schema, query); |
| 102 | + const result = await graphql(schema, query); |
104 | 103 | expect(result).toEqual({ |
105 | 104 | data: { |
106 | 105 | userPagination: { |
@@ -142,7 +141,7 @@ describe('composeWithRelay', () => { |
142 | 141 | count |
143 | 142 | } |
144 | 143 | }`; |
145 | | - await graphql.graphql(schema, query); |
| 144 | + await graphql(schema, query); |
146 | 145 | // $FlowFixMe |
147 | 146 | expect(Object.keys(topResolveParams.countResolveParams)).toEqual( |
148 | 147 | expect.arrayContaining(['source', 'args', 'context', 'info', 'projection']) |
@@ -172,7 +171,7 @@ describe('composeWithRelay', () => { |
172 | 171 | count |
173 | 172 | } |
174 | 173 | }`; |
175 | | - await graphql.graphql(schema, query); |
| 174 | + await graphql(schema, query); |
176 | 175 | // $FlowFixMe |
177 | 176 | expect(Object.keys(topResolveParams.findManyResolveParams)).toEqual( |
178 | 177 | expect.arrayContaining(['source', 'args', 'context', 'info', 'projection']) |
|
0 commit comments