@@ -64,16 +64,14 @@ describe('composeWithRelay', () => {
6464 it ( 'should has ConnectionType as type' , ( ) => {
6565 expect ( type ) . toBeTruthy ( ) ;
6666 expect ( tc . getFieldNames ( ) ) . toEqual ( expect . arrayContaining ( [ 'count' , 'pageInfo' , 'edges' ] ) ) ;
67- expect ( tc . getFieldType ( 'edges' ) ) . toBeInstanceOf ( GraphQLNonNull ) ;
68- expect ( tc . getFieldType ( 'edges' ) . ofType ) . toBeInstanceOf ( GraphQLList ) ;
67+ const edgesType : any = tc . getFieldType ( 'edges' ) ;
68+ expect ( edgesType ) . toBeInstanceOf ( GraphQLNonNull ) ;
69+ expect ( edgesType . ofType ) . toBeInstanceOf ( GraphQLList ) ;
6970 } ) ;
7071 } ) ;
7172
7273 it ( 'should apply first sort ID_ASC by default' , async ( ) => {
73- rootQueryTC . setField (
74- 'userConnection' ,
75- userTypeComposer . getResolver ( 'connection' ) . getFieldConfig ( )
76- ) ;
74+ rootQueryTC . setField ( 'userConnection' , userTypeComposer . getResolver ( 'connection' ) ) ;
7775 const schema = new GraphQLSchema ( {
7876 query : rootQueryTC . getType ( ) ,
7977 } ) ;
@@ -123,10 +121,7 @@ describe('composeWithRelay', () => {
123121 } ) ;
124122
125123 it ( 'should able to change `sort` on AGE_ID_DESC' , async ( ) => {
126- rootQueryTC . setField (
127- 'userConnection' ,
128- userTypeComposer . getResolver ( 'connection' ) . getFieldConfig ( )
129- ) ;
124+ rootQueryTC . setField ( 'userConnection' , userTypeComposer . getResolver ( 'connection' ) ) ;
130125 const schema = new GraphQLSchema ( {
131126 query : rootQueryTC . getType ( ) ,
132127 } ) ;
@@ -178,10 +173,7 @@ describe('composeWithRelay', () => {
178173
179174 describe ( 'fragments fields projection of graphql-compose' , ( ) => {
180175 it ( 'should return object' , async ( ) => {
181- rootQueryTC . setField (
182- 'userConnection' ,
183- userTypeComposer . getResolver ( 'connection' ) . getFieldConfig ( )
184- ) ;
176+ rootQueryTC . setField ( 'userConnection' , userTypeComposer . getResolver ( 'connection' ) ) ;
185177 const schema = new GraphQLSchema ( {
186178 query : rootQueryTC . getType ( ) ,
187179 } ) ;
@@ -246,14 +238,11 @@ describe('composeWithRelay', () => {
246238
247239 rootQueryTC . setField (
248240 'userConnection' ,
249- userTypeComposer
250- . getResolver ( 'connection' )
251- . wrapResolve ( next => rp => {
252- const result = next ( rp ) ;
253- topResolveParams = rp ;
254- return result ;
255- } )
256- . getFieldConfig ( )
241+ userTypeComposer . getResolver ( 'connection' ) . wrapResolve ( next => rp => {
242+ const result = next ( rp ) ;
243+ topResolveParams = rp ;
244+ return result ;
245+ } )
257246 ) ;
258247 const schema = new GraphQLSchema ( {
259248 query : rootQueryTC . getType ( ) ,
@@ -279,14 +268,11 @@ describe('composeWithRelay', () => {
279268
280269 rootQueryTC . setField (
281270 'userConnection' ,
282- userTypeComposer
283- . getResolver ( 'connection' )
284- . wrapResolve ( next => rp => {
285- const result = next ( rp ) ;
286- topResolveParams = rp ;
287- return result ;
288- } )
289- . getFieldConfig ( )
271+ userTypeComposer . getResolver ( 'connection' ) . wrapResolve ( next => rp => {
272+ const result = next ( rp ) ;
273+ topResolveParams = rp ;
274+ return result ;
275+ } )
290276 ) ;
291277 const schema = new GraphQLSchema ( {
292278 query : rootQueryTC . getType ( ) ,
0 commit comments