From abb69a9ca17718a1c4a3c698c4066ba9401b6d84 Mon Sep 17 00:00:00 2001 From: Eugene Lubarsky Date: Mon, 12 Jun 2017 23:08:06 +1000 Subject: [PATCH 1/2] TypeScript: missing properties in MutationOpts (fix for #750) --- src/graphql.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/graphql.tsx b/src/graphql.tsx index c1e2a779a6..5caaf79a8e 100644 --- a/src/graphql.tsx +++ b/src/graphql.tsx @@ -27,6 +27,8 @@ import ApolloClient, { FetchMoreQueryOptions, SubscribeToMoreOptions, } from 'apollo-client'; +import { PureQueryOptions } from 'apollo-client/core/types'; +import { MutationUpdaterFn } from 'apollo-client/core/watchQueryOptions'; import { ExecutionResult, @@ -39,6 +41,8 @@ export declare interface MutationOpts { variables?: Object; optimisticResponse?: Object; updateQueries?: MutationQueryReducersMap; + refetchQueries?: string[] | PureQueryOptions[]; + update?: MutationUpdaterFn; } export declare interface QueryOpts { From c3f0e04a5fbeb2f34e8dbccc4d408239bbcb331c Mon Sep 17 00:00:00 2001 From: Eugene Lubarsky Date: Tue, 13 Jun 2017 11:35:47 +1000 Subject: [PATCH 2/2] Flow: missing properties in MutationOpts (fix for #750) --- index.js.flow | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js.flow b/index.js.flow index 5e10ba85fa..f0a260c713 100644 --- a/index.js.flow +++ b/index.js.flow @@ -8,6 +8,8 @@ import type { UpdateQueryOptions, FetchMoreQueryOptions, SubscribeToMoreOptions, + PureQueryOptions, + MutationUpdaterFn, } from "apollo-client"; import type { Store } from "redux"; import type { DocumentNode, VariableDefinitionNode } from "graphql"; @@ -49,6 +51,8 @@ declare module "react-apollo" { variables?: Object, optimisticResponse?: Object, updateQueries?: MutationQueryReducersMap, + refetchQueries?: string[] | PureQueryOptions[]; + update?: MutationUpdaterFn; } declare export interface QueryOpts {