@@ -36,7 +36,7 @@ describe('composeWithRelay', () => {
3636 it ( 'should thow error if typeComposer does not have findById resolver' , ( ) => {
3737 const tc = userTypeComposer . clone ( 'AnotherUserType' ) ;
3838 tc . removeResolver ( 'findById' ) ;
39- expect ( ( ) => composeWithRelay ( tc ) ) . to . throw ( ' does not have resolver with name \ 'findById\'' ) ;
39+ expect ( ( ) => composeWithRelay ( tc ) ) . to . throw ( " does not have resolver with name 'findById'" ) ;
4040 } ) ;
4141 } ) ;
4242
@@ -61,7 +61,8 @@ describe('composeWithRelay', () => {
6161 } ) ;
6262
6363 it ( 'should resolve globalId in `user.id` field' , async ( ) => {
64- rootQueryTypeComposer . setField ( 'user' ,
64+ rootQueryTypeComposer . setField (
65+ 'user' ,
6566 userTypeComposer . getResolver ( 'findById' ) . getFieldConfig ( )
6667 ) ;
6768 const schema = new GraphQLSchema ( {
@@ -73,13 +74,14 @@ describe('composeWithRelay', () => {
7374 name
7475 }
7576 }` ;
76- const result = await graphql ( schema , query ) ;
77+ const result = await graphql . graphql ( schema , query ) ;
7778 expect ( result ) . nested . property ( 'data.user.id' ) . equal ( toGlobalId ( 'User' , 1 ) ) ;
7879 expect ( result ) . nested . property ( 'data.user.name' ) . equal ( 'Pavel' ) ;
7980 } ) ;
8081
8182 it ( 'should resolve globalId in `node.id` field' , async ( ) => {
82- rootQueryTypeComposer . setField ( 'user' ,
83+ rootQueryTypeComposer . setField (
84+ 'user' ,
8385 userTypeComposer . getResolver ( 'findById' ) . getFieldConfig ( )
8486 ) ;
8587 const schema = new GraphQLSchema ( {
@@ -94,13 +96,14 @@ describe('composeWithRelay', () => {
9496 id
9597 name
9698 }` ;
97- const result = await graphql ( schema , query ) ;
99+ const result = await graphql . graphql ( schema , query ) ;
98100 expect ( result ) . nested . property ( 'data.node.id' ) . equal ( toGlobalId ( 'User' , 1 ) ) ;
99101 expect ( result ) . nested . property ( 'data.node.name' ) . equal ( 'Pavel' ) ;
100102 } ) ;
101103
102104 it ( 'should passthru clientMutationId in mutations' , async ( ) => {
103- rootMutationComposer . setField ( 'createUser' ,
105+ rootMutationComposer . setField (
106+ 'createUser' ,
104107 userTypeComposer . getResolver ( 'createOne' ) . getFieldConfig ( )
105108 ) ;
106109 const schema = new GraphQLSchema ( {
@@ -115,11 +118,9 @@ describe('composeWithRelay', () => {
115118 clientMutationId
116119 }
117120 }` ;
118- const result = await graphql ( schema , query ) ;
119- expect ( result ) . nested . property ( 'data.createUser.record.name' )
120- . equal ( 'Ok' ) ;
121- expect ( result ) . nested . property ( 'data.createUser.clientMutationId' )
122- . equal ( '123' ) ;
121+ const result = await graphql . graphql ( schema , query ) ;
122+ expect ( result ) . nested . property ( 'data.createUser.record.name' ) . equal ( 'Ok' ) ;
123+ expect ( result ) . nested . property ( 'data.createUser.clientMutationId' ) . equal ( '123' ) ;
123124 } ) ;
124125 } ) ;
125126} ) ;
0 commit comments