diff --git a/Changelog.md b/Changelog.md index 641ddcbe95..879fb15967 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,15 @@ # Change log +## 2.5.1 + +### Bug Fixes + +- Make sure `MockedProvider` enables Apollo Client 2.5's local state handling, + and allow custom / mocked resolvers to be passed in as props, and used with + the created test `ApolloClient` instance.
+ [@hwillson](https://github.com/hwillson) in [#2825](https://github.com/apollographql/react-apollo/pull/2825) + + ## 2.5.0 ### Improvements diff --git a/src/test-utils.tsx b/src/test-utils.tsx index 53df07d48e..3cfc95f613 100644 --- a/src/test-utils.tsx +++ b/src/test-utils.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import ApolloClient from 'apollo-client'; -import { DefaultOptions } from 'apollo-client'; +import { DefaultOptions, Resolvers } from 'apollo-client'; import { InMemoryCache as Cache } from 'apollo-cache-inmemory'; import { ApolloProvider } from './index'; @@ -13,6 +13,7 @@ export interface MockedProviderProps { addTypename?: boolean; defaultOptions?: DefaultOptions; cache?: ApolloCache; + resolvers?: Resolvers; } export interface MockedProviderState { @@ -27,11 +28,18 @@ export class MockedProvider extends React.Component