Skip to content

Commit dbe468f

Browse files
committed
add @ts-expect-error fixme
1 parent 82892a5 commit dbe468f

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

src/connection/__tests__/connection-test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const userType = new GraphQLObjectType({
5555

5656
const { connectionType: friendConnection } = connectionDefinitions({
5757
name: 'Friend',
58+
// @ts-expect-error TODO FIXME
5859
nodeType: new GraphQLNonNull(userType),
5960
resolveNode: (edge) => allUsers[edge.node],
6061
edgeFields: () => ({
@@ -72,6 +73,7 @@ const { connectionType: friendConnection } = connectionDefinitions({
7273
});
7374

7475
const { connectionType: userConnection } = connectionDefinitions({
76+
// @ts-expect-error TODO FIXME
7577
nodeType: new GraphQLNonNull(userType),
7678
resolveNode: (edge) => allUsers[edge.node],
7779
});

src/connection/connection.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ type GraphQLConnectionDefinitions = {
8888

8989
function resolveMaybeThunk<T>(thingOrThunk: Thunk<T>): T {
9090
return typeof thingOrThunk === 'function'
91-
? // $FlowFixMe[incompatible-use] - if it's a function, we assume a thunk without arguments
91+
? // @ts-expect-error - if it's a function, we assume a thunk without arguments
9292
thingOrThunk()
9393
: thingOrThunk;
9494
}
@@ -105,6 +105,7 @@ export function connectionDefinitions(
105105
const edgeType = new GraphQLObjectType({
106106
name: name + 'Edge',
107107
description: 'An edge in a connection.',
108+
// @ts-expect-error TODO FIXME
108109
fields: () => ({
109110
node: {
110111
type: nodeType,

src/mutation/mutation.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ type MutationFn = (object: any, ctx: any, info: GraphQLResolveInfo) => unknown;
1919

2020
function resolveMaybeThunk<T>(thingOrThunk: Thunk<T>): T {
2121
return typeof thingOrThunk === 'function'
22-
? // $FlowFixMe[incompatible-use] - if it's a function, we assume a thunk without arguments
22+
? // @ts-expect-error - if it's a function, we assume a thunk without arguments
2323
thingOrThunk()
2424
: thingOrThunk;
2525
}
@@ -91,13 +91,14 @@ export function mutationWithClientMutationId(
9191
const { clientMutationId } = input;
9292
const payload = mutateAndGetPayload(input, context, info);
9393
if (isPromise(payload)) {
94+
// @ts-expect-error FIXME
9495
return payload.then(injectClientMutationId);
9596
}
9697
return injectClientMutationId(payload);
9798

9899
function injectClientMutationId(data: unknown) {
99100
if (typeof data === 'object' && data !== null) {
100-
// $FlowFixMe[cannot-write] It's bad idea to mutate data but we need to pass clientMutationId somehow. Maybe in future we figure out better solution satisfying all our test cases.
101+
// @ts-expect-error FIXME It's bad idea to mutate data but we need to pass clientMutationId somehow. Maybe in future we figure out better solution satisfying all our test cases.
101102
data.clientMutationId = clientMutationId;
102103
}
103104

0 commit comments

Comments
 (0)