File tree Expand file tree Collapse file tree 4 files changed +6
-12
lines changed Expand file tree Collapse file tree 4 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ export type MutationFn = (
1212 object : any ,
1313 ctx : any ,
1414 info : GraphQLResolveInfo ,
15- ) => Promise < any > | any ;
15+ ) => unknown ;
1616
1717// TS_SPECIFIC: This type is only exported by TypeScript
1818/**
Original file line number Diff line number Diff line change @@ -13,11 +13,9 @@ import type {
1313 Thunk ,
1414} from 'graphql' ;
1515
16- type MutationFn = (
17- object : any ,
18- ctx : any ,
19- info : GraphQLResolveInfo ,
20- ) => Promise < any > | any ;
16+ import isPromise from 'graphql/jsutils/isPromise' ;
17+
18+ type MutationFn = ( object : any , ctx : any , info : GraphQLResolveInfo ) => mixed ;
2119
2220function resolveMaybeThunk < T > (thingOrThunk: Thunk< T > ): T {
2321 return typeof thingOrThunk === 'function'
@@ -100,7 +98,3 @@ export function mutationWithClientMutationId(
10098 } ,
10199 } ;
102100}
103-
104- function isPromise(value: any): boolean {
105- return typeof value ?. then === 'function' ;
106- }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export interface PluralIdentifyingRootFieldConfig {
1414 input : any ,
1515 context : any ,
1616 info : GraphQLResolveInfo ,
17- ) => any ;
17+ ) => unknown ;
1818 description ?: string ;
1919}
2020
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type PluralIdentifyingRootFieldConfig = {|
1515 input : any ,
1616 context : any ,
1717 info : GraphQLResolveInfo ,
18- ) => ?any ,
18+ ) => mixed ,
1919 description ?: string ,
2020| } ;
2121
You can’t perform that action at this time.
0 commit comments