Skip to content

Commit d81776a

Browse files
eug48James Baxley
authored andcommitted
Missing properties in MutationOpts (fix for apollographql#750) (apollographql#770)
* TypeScript: missing properties in MutationOpts (fix for apollographql#750) * Flow: missing properties in MutationOpts (fix for apollographql#750)
1 parent 23d131a commit d81776a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

index.js.flow

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import type {
88
UpdateQueryOptions,
99
FetchMoreQueryOptions,
1010
SubscribeToMoreOptions,
11+
PureQueryOptions,
12+
MutationUpdaterFn,
1113
} from "apollo-client";
1214
import type { Store } from "redux";
1315
import type { DocumentNode, VariableDefinitionNode } from "graphql";
@@ -49,6 +51,8 @@ declare module "react-apollo" {
4951
variables?: Object,
5052
optimisticResponse?: Object,
5153
updateQueries?: MutationQueryReducersMap,
54+
refetchQueries?: string[] | PureQueryOptions[];
55+
update?: MutationUpdaterFn;
5256
}
5357

5458
declare export interface QueryOpts {

src/graphql.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ import ApolloClient, {
2727
FetchMoreQueryOptions,
2828
SubscribeToMoreOptions,
2929
} from 'apollo-client';
30+
import { PureQueryOptions } from 'apollo-client/core/types';
31+
import { MutationUpdaterFn } from 'apollo-client/core/watchQueryOptions';
3032

3133
import {
3234
ExecutionResult,
@@ -39,6 +41,8 @@ export declare interface MutationOpts {
3941
variables?: Object;
4042
optimisticResponse?: Object;
4143
updateQueries?: MutationQueryReducersMap;
44+
refetchQueries?: string[] | PureQueryOptions[];
45+
update?: MutationUpdaterFn;
4246
client?: ApolloClient;
4347
}
4448

0 commit comments

Comments
 (0)