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 = (
12
12
object : any ,
13
13
ctx : any ,
14
14
info : GraphQLResolveInfo ,
15
- ) => Promise < any > | any ;
15
+ ) => unknown ;
16
16
17
17
// TS_SPECIFIC: This type is only exported by TypeScript
18
18
/**
Original file line number Diff line number Diff line change @@ -13,11 +13,9 @@ import type {
13
13
Thunk ,
14
14
} from 'graphql' ;
15
15
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 ;
21
19
22
20
function resolveMaybeThunk < T > (thingOrThunk: Thunk< T > ): T {
23
21
return typeof thingOrThunk === 'function'
@@ -100,7 +98,3 @@ export function mutationWithClientMutationId(
100
98
} ,
101
99
} ;
102
100
}
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 {
14
14
input : any ,
15
15
context : any ,
16
16
info : GraphQLResolveInfo ,
17
- ) => any ;
17
+ ) => unknown ;
18
18
description ?: string ;
19
19
}
20
20
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type PluralIdentifyingRootFieldConfig = {|
15
15
input : any ,
16
16
context : any ,
17
17
info : GraphQLResolveInfo ,
18
- ) => ?any ,
18
+ ) => mixed ,
19
19
description ?: string ,
20
20
| } ;
21
21
You can’t perform that action at this time.
0 commit comments