11/* @flow */
22
3- import { TypeComposer , graphql } from 'graphql-compose' ;
3+ import { TypeComposer } from 'graphql-compose' ;
4+ import {
5+ GraphQLInterfaceType ,
6+ GraphQLSchema ,
7+ GraphQLNonNull ,
8+ graphql ,
9+ } from 'graphql-compose/lib/graphql' ;
410import { composeWithRelay } from '../composeWithRelay' ;
511import { userTypeComposer } from '../__mocks__/userTypeComposer' ;
612import { rootQueryTypeComposer } from '../__mocks__/rootQueryTypeComposer' ;
713import { rootMutationTypeComposer } from '../__mocks__/rootMutationTypeComposer' ;
814import { toGlobalId } from '../globalId' ;
915
10- const { GraphQLInterfaceType, GraphQLSchema, GraphQLNonNull } = graphql ;
11-
1216describe ( 'composeWithRelay' , ( ) => {
1317 const userComposer = composeWithRelay ( userTypeComposer ) ;
1418 const rootQueryComposer = composeWithRelay ( rootQueryTypeComposer ) ;
@@ -73,7 +77,7 @@ describe('composeWithRelay', () => {
7377 name
7478 }
7579 }` ;
76- const result = await graphql . graphql ( schema , query ) ;
80+ const result = await graphql ( schema , query ) ;
7781 // $FlowFixMe
7882 expect ( result . data . user . id ) . toBe ( toGlobalId ( 'User' , 1 ) ) ;
7983 // $FlowFixMe
@@ -97,7 +101,7 @@ describe('composeWithRelay', () => {
97101 id
98102 name
99103 }` ;
100- const result = await graphql . graphql ( schema , query ) ;
104+ const result = await graphql ( schema , query ) ;
101105 // $FlowFixMe
102106 expect ( result . data . node . id ) . toBe ( toGlobalId ( 'User' , 1 ) ) ;
103107 // $FlowFixMe
@@ -121,7 +125,7 @@ describe('composeWithRelay', () => {
121125 clientMutationId
122126 }
123127 }` ;
124- const result = await graphql . graphql ( schema , query ) ;
128+ const result = await graphql ( schema , query ) ;
125129 // $FlowFixMe
126130 expect ( result . data . createUser . record . name ) . toBe ( 'Ok' ) ;
127131 // $FlowFixMe
0 commit comments