@@ -202,16 +202,36 @@ describe('mutationWithClientMutationId()', () => {
202202 } ) ;
203203 } ) ;
204204
205+ it ( 'generates correct types' , ( ) => {
206+ const description = 'Some Mutation Description' ;
207+ const deprecationReason = 'Just because' ;
208+ const extensions = Object . freeze ( { } ) ;
209+
210+ const someMutationField = mutationWithClientMutationId ( {
211+ name : 'SomeMutation' ,
212+ description,
213+ deprecationReason,
214+ extensions,
215+ inputFields : { } ,
216+ outputFields : { } ,
217+ mutateAndGetPayload : dummyResolve ,
218+ } ) ;
219+
220+ expect ( someMutationField ) . to . include ( {
221+ description,
222+ deprecationReason,
223+ extensions,
224+ } ) ;
225+ } ) ;
226+
205227 it ( 'generates correct types' , ( ) => {
206228 const someMutation = mutationWithClientMutationId ( {
207229 name : 'SomeMutation' ,
208- description : 'Some Mutation Description' ,
209230 inputFields : { } ,
210231 outputFields : {
211232 result : { type : GraphQLInt } ,
212233 } ,
213234 mutateAndGetPayload : dummyResolve ,
214- deprecationReason : 'Just because' ,
215235 } ) ;
216236
217237 const schema = wrapInSchema ( { someMutation } ) ;
@@ -223,8 +243,7 @@ describe('mutationWithClientMutationId()', () => {
223243 }
224244
225245 type Mutation {
226- """Some Mutation Description"""
227- someMutation(input: SomeMutationInput!): SomeMutationPayload @deprecated(reason: "Just because")
246+ someMutation(input: SomeMutationInput!): SomeMutationPayload
228247 }
229248
230249 type SomeMutationPayload {
0 commit comments