From c260cc5cb2c1f8aa2075f8a021d89e766428ac84 Mon Sep 17 00:00:00 2001 From: Ting-Hsiang Hsu Date: Wed, 29 May 2019 02:15:07 +0800 Subject: [PATCH] Fix query is required in fetchMore (#3065) * fix(Query): fix typescript * Changelog update --- Changelog.md | 3 +++ src/Query.tsx | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index edf1389144..7188b40123 100644 --- a/Changelog.md +++ b/Changelog.md @@ -17,6 +17,9 @@ [@brentertz](https://github.com/brentertz) in [#3064](https://github.com/apollographql/react-apollo/pull/3064) - Stop setting optional input to `null`, when using the `graphql` HOC.
[@ZhengYuTay](https://github.com/ZhengYuTay) in [#3056](https://github.com/apollographql/react-apollo/pull/3056) +- Fix typescript error caused by `query` being mandatory in the `fetchMore` + signature.
+ [@HsuTing](https://github.com/HsuTing) in [#3065](https://github.com/apollographql/react-apollo/pull/3065) ## 2.5.6 (2019-05-22) diff --git a/src/Query.tsx b/src/Query.tsx index 8f9ba92af7..3e486fedce 100644 --- a/src/Query.tsx +++ b/src/Query.tsx @@ -27,7 +27,7 @@ export type ObservableQueryFields = Pick< fetchMoreOptions: FetchMoreQueryOptions & FetchMoreOptions, ) => Promise>) & (( - fetchMoreOptions: { query: DocumentNode } & FetchMoreQueryOptions & + fetchMoreOptions: { query?: DocumentNode } & FetchMoreQueryOptions & FetchMoreOptions, ) => Promise>); };