Skip to content

Commit

Permalink
Remove reference to GlobalFetch in Typescript (#5373)
Browse files Browse the repository at this point in the history
* Remove reference to GlobalFetch in Typescript

* Changelog update
  • Loading branch information
abdonrd authored and hwillson committed Dec 13, 2019
1 parent a222c05 commit 362e465
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
- Fix `filter` edge case involving `null`. <br/>
[@lifeiscontent](https://github.com/lifeiscontent) in [#5110](https://github.com/apollographql/apollo-client/pull/5110)

### Apollo Boost

- Replace `GlobalFetch` reference with `WindowOrWorkerGlobalScope`. <br/>
[@abdonrd](https://github.com/abdonrd) in [#5373](https://github.com/apollographql/apollo-client/pull/5373)


## Apollo Client (2.6.4)

Expand Down
2 changes: 1 addition & 1 deletion docs/source/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Here are the options you can pass to the `ApolloClient` exported from `apollo-bo
| `cacheRedirects` | Object | A map of functions to redirect a query to another entry in the cache before a request takes place. This is useful if you have a list of items and want to use the data from the list query on a detail page where you're querying an individual item. More on that <a href="/features/performance">here</a>. |
| `credentials` | string | Is set to `same-origin` by default. This option can be used to indicate whether the user agent should send cookies with requests. See <a href="https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials">Request.credentials</a> for more details. |
| `headers` | Object | Header key/value pairs to pass along with the request. |
| `fetch` | GlobalFetch['fetch'] | A <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">`fetch`</a> compatible API for making a request. |
| `fetch` | WindowOrWorkerGlobalScope['fetch'] | A <a href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API">`fetch`</a> compatible API for making a request. |
| `cache` | ApolloCache | A custom instance of `ApolloCache` to be used. The default value is `InMemoryCache` from `apollo-cache-inmemory`. This option is quite useful for using a custom cache with `apollo-cache-persist`. |
## Next steps
Expand Down
2 changes: 1 addition & 1 deletion packages/apollo-boost/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface PresetConfig {
uri?: string | UriFunction;
credentials?: string;
headers?: any;
fetch?: GlobalFetch['fetch'];
fetch?: WindowOrWorkerGlobalScope['fetch'];
fetchOptions?: HttpLink.Options;
clientState?: ClientStateConfig;
onError?: ErrorLink.ErrorHandler;
Expand Down

0 comments on commit 362e465

Please sign in to comment.