From 29df293b3fe77a833eef4c7b451e8d34fca76cb3 Mon Sep 17 00:00:00 2001 From: Tommy Leunen Date: Fri, 21 Feb 2020 12:33:42 -0500 Subject: [PATCH] Allow passing a `fetchPolicy` to `useBackgroundQuery` --- packages/react-graphql/CHANGELOG.md | 4 ++++ packages/react-graphql/src/hooks/background-query.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/react-graphql/CHANGELOG.md b/packages/react-graphql/CHANGELOG.md index 5b22314a8d..f1e0fb1107 100644 --- a/packages/react-graphql/CHANGELOG.md +++ b/packages/react-graphql/CHANGELOG.md @@ -7,6 +7,10 @@ and adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Changed + +- Improve typings for `useBackgroundQuery` by allowing the `fetchPolicy` option. ([#1293](https://github.com/Shopify/quilt/pull/1293)). + ## [6.0.7] - 2020-01-24 ### Fixed diff --git a/packages/react-graphql/src/hooks/background-query.ts b/packages/react-graphql/src/hooks/background-query.ts index 1aed6c0963..3151c45a53 100644 --- a/packages/react-graphql/src/hooks/background-query.ts +++ b/packages/react-graphql/src/hooks/background-query.ts @@ -13,7 +13,7 @@ type Subscription = ReturnType< export function useBackgroundQuery( load: () => Promise, - options?: Omit, + options?: Omit, ) { const client = useApolloClient(); const lastClient = useRef(client);