devinit / datahub

Datahub v2
http://data.devinit.org
15 stars 4 forks source link

Update Apollo GraphQL packages #507

Open renovate[bot] opened 4 years ago

renovate[bot] commented 4 years ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
graphql-tag 2.10.0 -> 2.12.6 age adoption passing confidence
react-apollo 2.0.4 -> 2.5.8 age adoption passing confidence

Release Notes

apollographql/graphql-tag (graphql-tag) ### [`v2.12.6`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2126) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/cd2f4d0ab46c515a6628a3bef5600534c7d1a7a0...v2.12.6) - Update peer dependencies to allow `graphql` ^16.0.0.
[@​brainkim](https://redirect.github.com/brainkim) in [#​530](https://redirect.github.com/apollographql/graphql-tag/pull/530) ### [`v2.12.5`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2125) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.12.4...cd2f4d0ab46c515a6628a3bef5600534c7d1a7a0) - Also publish `src/` directory to npm, enabling source maps.
[@​maclockard](https://redirect.github.com/maclockard) in [#​403](https://redirect.github.com/apollographql/graphql-tag/pull/403) ### [`v2.12.4`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2124-2021-04-29) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.12.3...v2.12.4) - Allow fragments to be imported by name when using the webpack loader.
[@​dobesv](https://redirect.github.com/dobesv) in [#​257](https://redirect.github.com/apollographql/graphql-tag/pull/257) ### [`v2.12.3`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2123) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.12.2...v2.12.3) - Update `tslib` dependency to version 2.1.0.
[@​benjamn](http://github.com/benjamn) in [#​381](https://redirect.github.com/apollographql/graphql-tag/pull/381) ### [`v2.12.2`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2122) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.12.1...v2.12.2) - Avoid using `Object.assign` to attach extra properties to `gql`.
[@​benjamn](http://github.com/benjamn) in [#​380](https://redirect.github.com/apollographql/graphql-tag/pull/380) ### [`v2.12.1`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2121) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.12.0...v2.12.1) - To accommodate older versions of TypeScript, usage of the `import type ...` syntax (introduced by [#​325](https://redirect.github.com/apollographql/graphql-tag/pull/325)) has been removed, fixing issue [#​345](https://redirect.github.com/apollographql/graphql-tag/issues/345).
[@​benjamn](http://github.com/benjamn) in [#​352](https://redirect.github.com/apollographql/graphql-tag/pull/352) ### [`v2.12.0`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2120) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.11.0...v2.12.0) - The `graphql-tag` repository has been converted to TypeScript, adding type safety and enabling both ECMAScript and CommonJS module exports. While these changes are intended to be as backwards-compatible as possible, we decided to bump the minor version to reflect the significant refactoring.
[@​PowerKiKi](http://github.com/PowerKiKi) and [@​benjamn](http://github.com/benjamn) in [#​325](https://redirect.github.com/apollographql/graphql-tag/pull/325) ### [`v2.11.0`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2110-2020-07-28) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/a73bc250d8f3fdd1304c77d1102138171a29b266...v2.11.0) - `package.json` `sideEffects` changes to clearly identify that `graphql-tag` doesn't have side effects.
[@​hwillson](http://github.com/hwillson) in [#​313](https://redirect.github.com/apollographql/graphql-tag/pull/313) ### [`v2.10.4`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2104-2020-07-08) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.10.3...a73bc250d8f3fdd1304c77d1102138171a29b266) - Bump dev/peer deps to accommodate `graphql` 15.
[@​adriencohen](https://redirect.github.com/adriencohen) in [#​299](https://redirect.github.com/apollographql/graphql-tag/pull/299) ### [`v2.10.3`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2103-2020-02-05) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.10.2...v2.10.3) - Further adjustments to the TS `index.d.ts` declaration file.
[@​Guillaumez](https://redirect.github.com/Guillaumez) in [#​289](https://redirect.github.com/apollographql/graphql-tag/pull/289) ### [`v2.10.2`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2102-2020-02-04) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.10.1...v2.10.2) - Update/fix the existing TS `index.d.ts` declaration file.
[@​hwillson](https://redirect.github.com/hwillson) in [#​285](https://redirect.github.com/apollographql/graphql-tag/pull/285) ### [`v2.10.1`](https://redirect.github.com/apollographql/graphql-tag/blob/HEAD/CHANGELOG.md#v2101) [Compare Source](https://redirect.github.com/apollographql/graphql-tag/compare/v2.10.0...v2.10.1) - Fix failures in IE11 by avoiding unsupported (by IE11) constructor arguments to `Set` by [rocwang](https://redirect.github.com/rocwang) in [#​190](https://redirect.github.com/apollographql/graphql-tag/pull/190)
apollographql/react-apollo (react-apollo) ### [`v2.5.8`](https://redirect.github.com/apollographql/react-apollo/releases/tag/2.5.8) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.7...2.5.8) ##### 2.5.8 (2019-06-21) ##### Bug Fixes - Makes the use of `apollo-client` 2.6.3's `ObservableQuery.resetQueryStoreErrors` method optional, for people who can't update to `react-apollo`'s new `apollo-client` peer dep of 2.6.3. [@​hwillson](https://redirect.github.com/hwillson) in [#​3151](https://redirect.github.com/apollographql/react-apollo/pull/3151) ### [`v2.5.7`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#257-2019-06-21) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.6...v2.5.7) ##### Improvements - Make sure `MockedProvider` is using the proper CJS/ESM bundle, when referencing `ApolloProvider`.
[@​jure](https://redirect.github.com/jure) in [#​3029](https://redirect.github.com/apollographql/react-apollo/pull/3029). - Adjust the `ApolloContext` definition to play a bit more nicely with `React.createContext` types.
[@​JoviDeCroock](https://redirect.github.com/JoviDeCroock) in [#​3018](https://redirect.github.com/apollographql/react-apollo/pull/3018) - The result of a mutation is now made available to the wrapped component, when using the `graphql` HOC.
[@​andycarrell](https://redirect.github.com/andycarrell) in [#​3008](https://redirect.github.com/apollographql/react-apollo/pull/3008) - Check equality of stringified variables in the `MockLink` to improve debugging experience used by `MockedProvider`.
[@​evans](https://redirect.github.com/evans) in [#​3078](https://redirect.github.com/apollographql/react-apollo/pull/3078) ##### Bug Fixes - Removed leftover `apollo-client@beta` peer dep.
[@​brentertz](https://redirect.github.com/brentertz) in [#​3064](https://redirect.github.com/apollographql/react-apollo/pull/3064) - Stop setting optional input to `null`, when using the `graphql` HOC.
[@​ZhengYuTay](https://redirect.github.com/ZhengYuTay) in [#​3056](https://redirect.github.com/apollographql/react-apollo/pull/3056) - Fix typescript error caused by `query` being mandatory in the `fetchMore` signature.
[@​HsuTing](https://redirect.github.com/HsuTing) in [#​3065](https://redirect.github.com/apollographql/react-apollo/pull/3065) - Fixes an issue that caused the `Query` component to get stuck in an always loading state, caused by receiving an error (meaning subsequent valid responses couldn't be handled). The `Query` component can now handle an error in a response, then continue to handle a valid response afterwards.
[@​hwillson](https://redirect.github.com/hwillson) in [#​3107](https://redirect.github.com/apollographql/react-apollo/pull/3107) - Reorder `Subscription` component code to avoid setting state on unmounted component.
[@​jasonpaulos](https://redirect.github.com/jasonpaulos) in [#​3139](https://redirect.github.com/apollographql/react-apollo/pull/3139) - Fix component stuck in `loading` state for `network-only` fetch policy.
[@​jasonpaulos](https://redirect.github.com/jasonpaulos) in [#​3126](https://redirect.github.com/apollographql/react-apollo/pull/3126) ### [`v2.5.6`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#256-2019-05-22) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.5...v2.5.6) ##### Improvements - Both the `Query` component and `graphql` HOC now accept a `returnPartialData` prop. This is an important new feature, that should help address a lot of open Apollo Client / React Apollo issues, so we'll explain it here with an example. Before this release, if you run a query that looks like: ```js const GET_MEMBER = gql` query GetMember($id: ID!) { member(id: $id) { id name } } `; ``` in one component, the results are cached, then you run a superset query like the following in another component: ```js const GET_MEMBER_WITH_PLANS = gql` query GetMemberWithPlans($id: ID!) { member(id: $id) { id name plans { id title duration } } } `; ``` Apollo Client will not re-use the partial data that was cached from the first query, when it preps and displays the second component. It can't find a cache hit for the full second query, so it fires the full query over the network. With this release, if you set a `returnPartialData` prop to `true` on the second component, the `data` available to that component will be automatically pre-loaded with the parts of the query that can be found in the cache, before the full query is fired over the network. This means you can do things like showing partial data in your components, while the rest of the data is being loaded over the network. ### [`v2.5.5`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#255-2019-04-22) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.4...v2.5.5) ##### Improvements - Export the Apollo Context provider (`ApolloContext`).
[@​MrLoh](https://redirect.github.com/MrLoh) in [#​2961](https://redirect.github.com/apollographql/react-apollo/pull/2961) ### [`v2.5.4`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#254-2019-04-05) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.3...v2.5.4) ##### Bug Fixes - Fixes `Could not find "client" in the context of ApolloConsumer` errors when using `MockedProvider`.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2907](https://redirect.github.com/apollographql/react-apollo/pull/2907) - Ensure `Query` components using a `fetchPolicy` of `no-cache` have their data preserved when the components tree is re-rendered.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2914](https://redirect.github.com/apollographql/react-apollo/pull/2914) ##### Improvements - Documentation updates.
[@​afenton90](https://redirect.github.com/afenton90) in [#​2932](https://redirect.github.com/apollographql/react-apollo/pull/2932) ### [`v2.5.3`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#253) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.2...v2.5.3) ##### Bug Fixes - Fixed an infinite loop caused by using `setState` in the `onError` / `onCompleted` callbacks of the `Query` component.
[@​chenesan](https://redirect.github.com/chenesan) in [#​2751](https://redirect.github.com/apollographql/react-apollo/pull/2751) - Fixed an issue that prevented good results from showing up in a `Query` component, after an error was received, variables were adjusted, and then the good data was fetched.
[@​MerzDaniel](https://redirect.github.com/MerzDaniel) in [#​2718](https://redirect.github.com/apollographql/react-apollo/pull/2718) - Fixed an issue that prevented `Query` component updates from firing (under certain circumstances) due to the internal `lastResult` value (that's used to help prevent unnecessary re-renders) not being updated.
[@​Glennrs](https://redirect.github.com/Glennrs) in [#​2840](https://redirect.github.com/apollographql/react-apollo/pull/2840) ##### Improvements - `MockedProvider` now accepts a `childProps` prop that can be used to pass props down to a child component.
[@​miachenmtl](https://redirect.github.com/miachenmtl) in [#​2482](https://redirect.github.com/apollographql/react-apollo/pull/2482) - `onCompleted` callbacks now use a destructuring-friendly type definition.
[@​jozanza](https://redirect.github.com/jozanza) in [#​2496](https://redirect.github.com/apollographql/react-apollo/pull/2496) - `@connection` directives are now properly stripped from `MockedResponse`'s, when using `MockedProvider`.
[@​ajmath](https://redirect.github.com/ajmath) in [#​2523](https://redirect.github.com/apollographql/react-apollo/pull/2523) - `MockedProvider` has been updated to stop setting a default `resolvers` value of `{}`, which means by default Apollo Client 2.5 local resolver functionality is not enabled when mocking with `MockedProvider`. This allows `@client` fields to be passed through the mocked link chain, like people were used to before AC 2.5. When using this default mode you will see a dev only warning message about this like: > Found [@​client](https://redirect.github.com/client) directives in query but no client resolvers were specified. > You can now pass apollo-link-state resolvers to the ApolloClient > constructor. This message can be safely ignored. If you want to use `MockedProvider` with AC 2.5's new local resolver functionality, you can pass your local resolver map into the `MockedProvider` `resolvers` prop.
[@​ajmath](https://redirect.github.com/ajmath) in [#​2524](https://redirect.github.com/apollographql/react-apollo/pull/2524) - Improvements to the `graphql` HOC generics for `fetchMore` and `refetch`.
[@​EricMcRay](https://redirect.github.com/EricMcRay) in [#​2525](https://redirect.github.com/apollographql/react-apollo/pull/2525) - The `ApolloProvider` / `ApolloConsumer` implementations have been refactored to use [React 16.3's new context API](https://reactjs.org/docs/context.html).
[@​wzrdzl](https://redirect.github.com/wzrdzl) in [#​2540](https://redirect.github.com/apollographql/react-apollo/pull/2540) - All `dependencies` and `devDependencies` have been updated to their latest versions, and related Typescript changes have been applied.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2873](https://redirect.github.com/apollographql/react-apollo/pull/2873) ### [`v2.5.2`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#v252) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.1...v2.5.2) ##### Bug Fixes - Export `Context` type from `types.ts` instead of `walkTree.ts`, to reenable `import { Context } from 'react-apollo'` (which has been broken since 2.4.0).
[@​benjamn](https://redirect.github.com/benjamn) in [#​2825](https://redirect.github.com/apollographql/react-apollo/pull/2832) ##### Improvements - Add [`examples/rollup`](https://redirect.github.com/apollographql/react-apollo/tree/master/examples/rollup) to enable application-level bundle measurement and demonstrate Rollup configuration best practices.
[@​benjamn](https://redirect.github.com/benjamn) in [#​2839](https://redirect.github.com/apollographql/react-apollo/pull/2839) - Bundle size reductions inspired by `examples/rollup` app.
[@​benjamn](https://redirect.github.com/benjamn) in [#​2842](https://redirect.github.com/apollographql/react-apollo/pull/2842) ### [`v2.5.1`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#251) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.5.0...v2.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://redirect.github.com/hwillson) in [#​2825](https://redirect.github.com/apollographql/react-apollo/pull/2825) ### [`v2.5.0`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#250) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.4.1...v2.5.0) ##### Improvements - Ready to be used with Apollo Client 2.5 and its new local state management features, as well as many overall code improvements to help reduce the React Apollo bundle size.
[#​2758](https://redirect.github.com/apollographql/react-apollo/pull/2758) - A function can now be set as a `MockedResponse` `result` when using `MockedProvider`, such that every time the mocked result is returned, the function is run to calculate the result. This opens up new testing possibilities, like being able to verify if a mocked result was actually requested and received by a test.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2788](https://redirect.github.com/apollographql/react-apollo/pull/2788) ### [`v2.4.1`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#241) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.4.0...v2.4.1) ##### Improvements - Adds a `onSubscriptionComplete` prop to the `Subscription` component, that can be passed a callback to be called when the subscription observable is completed.
[@​sujeetsr](https://redirect.github.com/sujeetsr) in [#​2716](https://redirect.github.com/apollographql/react-apollo/pull/2716) - During server-side rendering, `ObservableQuery` objects created in previous rendering passes will now be preserved in later passes (within the same `getDataFromTree` or `getMarkupFromTree` call), so that errors can be handled properly when using the `errorPolicy: "all"` option.
[PR #​2753](https://redirect.github.com/apollographql/react-apollo/pull/2753) ### [`v2.4.0`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#240) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.3.3...v2.4.0) ##### Bug Fixes - Invoke `onCompleted`/`onError` even if `Mutation` unmounts.
[PR #​2710](https://redirect.github.com/apollographql/react-apollo/pull/2710) ##### Improvements - The `walkTree` function has been deprecated, since there's no way to make its behavior consistent with the latest versions of React. To save bundle size, `walkTree` is no longer exported from `react-apollo`, though you can still access it as follows: ```js import { walkTree } from 'react-apollo/walkTree'; ``` ### [`v2.3.3`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#233) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.3.2...v2.3.3) ##### Bug Fixes - Add `react-dom` as a peer dependency (since it's used by `getDataFromTree` and `renderToStringWithData`).
[@​hwillson](https://redirect.github.com/hwillson) in [#​2660](https://redirect.github.com/apollographql/react-apollo/pull/2660) ##### Improvements - Drop `react` 14.x support, since the 14.x release line is 2 years old now, and `react-apollo` is no longer tested against it.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2660](https://redirect.github.com/apollographql/react-apollo/pull/2660) ### [`v2.3.2`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#232) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.3.1...v2.3.2) ##### Improvements ##### Bug Fixes - This package no longer imports `react-dom/server` unconditionally at the top level, making `react-apollo` safer to use in environments like React Native that are neither browser-like nor Node-like, and thus struggle to import `react-dom/server` and its dependencies. Additionally, the React Native bundler has been instructed to ignore all `react-dom/server` dependencies within `react-apollo`, so `react-dom` will not be bundled in React Native apps simply because they import `react-apollo`. [PR #​2627](https://redirect.github.com/apollographql/react-apollo/pull/2627) ### [`v2.3.1`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#231-November-15-2018) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.3.0...v2.3.1) ##### Improvements - Restore original `getDataFromTree(tree, context)` API, and introduce a new alternative called `getMarkupFromTree` to enable custom rendering functions: ```typescript export default function getDataFromTree( tree: React.ReactNode, context: { [key: string]: any } = {}, ) { return getMarkupFromTree({ tree, context, renderFunction: renderToStaticMarkup, }); } export type GetMarkupFromTreeOptions = { tree: React.ReactNode; context?: { [key: string]: any }; renderFunction?: typeof renderToStaticMarkup; }; export function getMarkupFromTree({ tree, context = {}, renderFunction = renderToStaticMarkup, }: GetMarkupFromTreeOptions): Promise {...} ``` [PR #​2586](https://redirect.github.com/apollographql/react-apollo/pull/2586) ##### Bug Fixes - Version 2.3.0 was published incorrectly, breaking nested `react-apollo/...` imports. This problem was fixed in version 2.3.1 by running `npm publish` from the `lib/` directory, as intended. [Issue #​2591](https://redirect.github.com/apollographql/react-apollo/issues/2591) ### [`v2.3.0`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#230) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.2.4...v2.3.0) ##### Bug Fixes - Fix `networkStatus` to reflect the loading state correctly for partial refetching.
[@​steelbrain](https://redirect.github.com/steelbrain) in [#​2493](https://redirect.github.com/apollographql/react-apollo/pull/2493) ##### Improvements - Reimplement `getDataFromTree` using `ReactDOM.renderToStaticMarkup` to make asynchronous server-side rendering compatible with [React hooks](https://reactjs.org/docs/hooks-intro.html). Although the rendering function used by `getDataFromTree` defaults to `renderToStaticMarkup`, any suitable rendering function can be passed as the optional second argument to `getDataFromTree`, which now returns a `Promise` that resolves to The HTML rendered in the final pass, which means calling `renderToString` after `getDataFromTree` may not be necessary anymore. [PR #​2533](https://redirect.github.com/apollographql/react-apollo/pull/2533) ### [`v2.2.4`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#224-October-2-2018) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.2.3...v2.2.4) ##### Bug Fixes - `lodash.isequal` was improperly set as a dev dependency for `MockLink` / `MockedProvider`. It is now a dependency.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2449](https://redirect.github.com/apollographql/react-apollo/pull/2449) ##### Improvements - The `Subscription` component now accepts a `fetchPolicy` prop.
[@​MatthieuLemoine](https://redirect.github.com/MatthieuLemoine) in [#​2298](https://redirect.github.com/apollographql/react-apollo/pull/2298) ##### Typescript - Make sure the `TVariables` generic is passed to `ObservableQuery`.
[@​tgriesser](https://redirect.github.com/tgriesser) in [#​2311](https://redirect.github.com/apollographql/react-apollo/pull/2311) ### [`v2.2.3`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#223-September-30-2018) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.2.2...v2.2.3) ##### Bug Fixes - Mutation errors are now properly returned as a render prop, when using a default `errorPolicy` of `all`.
[@​amacleay](https://redirect.github.com/amacleay) in [#​2374](https://redirect.github.com/apollographql/react-apollo/pull/2374) - `` `refetchQueries` triggered by name (string) will now use the correct variables.
[@​fracmal](https://redirect.github.com/fracmak) in [#​2422](https://redirect.github.com/apollographql/react-apollo/pull/2422) ##### Improvements - Replace the `lodash` dependency with `lodash.flowright` (since that's the only non-dev `lodash` function we're dependent on). Dev `lodash` dependencies have also been updated to use their individual module equivalent.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2435](https://redirect.github.com/apollographql/react-apollo/pull/2435) - Removed `rollup-plugin-babel-minify` as it's no longer being used.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2436](https://redirect.github.com/apollographql/react-apollo/pull/2436) - Small `getDataFromTree.ts` logic adjustment to avoid unnecessary calls when a falsy `element` is encountered.
[@​HOUCe](https://redirect.github.com/HOUCe) in [#​2429](https://redirect.github.com/apollographql/react-apollo/pull/2429) - `graphql` 14 updates.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2437](https://redirect.github.com/apollographql/react-apollo/pull/2437) - All example apps (included in the repo) have been updated to work with the latest version of React Apollo.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2439](https://redirect.github.com/apollographql/react-apollo/pull/2439) ##### Typescript - Fix `lodash` typings.
[@​williamboman](https://redirect.github.com/williamboman) in [#​2430](https://redirect.github.com/apollographql/react-apollo/pull/2430) - Typings: added `context` to `MutationOptions`.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2354](https://redirect.github.com/apollographql/react-apollo/pull/2354) - Typings: more `MutationOptions` changes/fixes.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2340](https://redirect.github.com/apollographql/react-apollo/pul/2340) - Remove `allowSyntheticDefaultImports` use. Typescript's `allowSyntheticDefaultImports` compiler option is something we'd like to start using, but we jumped the gun a bit by introducing it in https://github.com/apollographql/react-apollo/commit/9a96519d390783dfd9a431dc2dbaa476a24f7b80. Including it means that anyone who wants to use Typescript with React Apollo would have to also include it in their own local `tsconfig.json`, to be able to handle default imports properly. This is because we're also using Typescript's `es2015` `module` option, which means `allowSyntheticDefaultImports` has to be enabled explicitly. We've switched back to using a combination of `import * as X` and `require` syntax, to work with default imports. We'll re-introduce `allowSyntheticDefaultImports` use in React Apollo 3.
[@​hwillson](https://redirect.github.com/hwillson) in [#​2438](https://redirect.github.com/apollographql/react-apollo/pull/2438) ### [`v2.2.2`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#222-September-28-2018) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/v2.2.1...v2.2.2) - When using `React.createContext` and SSR, we now make sure the context provider value is reset to the previous value it had after its children are walked.
[@​mitchellhamilton](https://redirect.github.com/mitchellhamilton) in [#​2304](https://redirect.github.com/apollographql/react-apollo/pull/2304) - Revert:
When a query failed on the first result, the query result `data` was being returned as `undefined`. This behavior has been changed so that `data` is returned as an empty object. This makes checking for data (e.g. instead of `data && data.user` you can just check `data.user`) and destructring (e.g. `{ data: { user } }`) easier. **Note:** this could potentially hurt applications that are relying on a falsey check of `data` to see if any query errors have occurred. A better (and supported) way to check for errors is to use the result `errors` property.
[#​1983](https://redirect.github.com/apollographql/react-apollo/pull/1983) ### [`v2.2.1`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#221-September-26-2018) [Compare Source](https://redirect.github.com/apollographql/react-apollo/compare/2.2.0...v2.2.1) - Revert: "Typescript: use `Partial` instead of `TData | {}`, for the `QueryResult` `data` property." ### [`v2.2.0`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#220-September-26-2018) - Improved TypeScript Typings: Deprecated `MutationFunc` in favor of `MutationFn`. Added missing `onCompleted` and `onError` callbacks to `MutationOpts`.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2322](https://redirect.github.com/apollographql/react-apollo/pull/2322) - Added an example app that shows how to test mutations.
[@​excitement-engineer](https://redirect.github.com/excitement-engineer) in [#​1998](https://redirect.github.com/apollographql/react-apollo/pull/1998) - The `` component now allows the registration of a callback function, that will be triggered each time the component receives data. The callback `options` object param consists of the current Apollo Client instance in `client`, and the received subscription data in `subscriptionData`.
[@​jedwards1211](https://redirect.github.com/jedwards1211) in [#​1966](https://redirect.github.com/apollographql/react-apollo/pull/1966) - The `graphql` `options` object is no longer mutated, when calculating variables from props. This now prevents an issue where components created with `graphql` were not having their query variables updated properly, when props changed.
[@​ksmth](https://redirect.github.com/ksmth) in [#​1968](https://redirect.github.com/apollographql/react-apollo/pull/1968) - When a query failed on the first result, the query result `data` was being returned as `undefined`. This behavior has been changed so that `data` is returned as an empty object. This makes checking for data (e.g. instead of `data && data.user` you can just check `data.user`) and destructring (e.g. `{ data: { user } }`) easier. **Note:** this could potentially hurt applications that are relying on a falsey check of `data` to see if any query errors have occurred. A better (and supported) way to check for errors is to use the result `errors` property.
[@​TLadd](https://redirect.github.com/TLadd) in [#​1983](https://redirect.github.com/apollographql/react-apollo/pull/1983) - Allow a custom `cache` object to be passed into the test-utils `MockedProvider`.
[@​palmfjord](https://redirect.github.com/palmfjord) in [#​2254](https://redirect.github.com/apollographql/react-apollo/pull/2254) - Make the `MockedProvider` `mocks` prop read only.
[@​amacleay](https://redirect.github.com/amacleay) in [#​2284](https://redirect.github.com/apollographql/react-apollo/pull/2284) - Remove duplicate `FetchMoreOptions` and `FetchMoreQueryOptions` types, and instead import them from Apollo Client.
[@​skovy](https://redirect.github.com/skovy) in [#​2281](https://redirect.github.com/apollographql/react-apollo/pull/2281) - Type changes for the `graphql` HOC `options.skip` property.
[@​jameslaneconkling](https://redirect.github.com/jameslaneconkling) in [#​2208](https://redirect.github.com/apollographql/react-apollo/pull/2208) - Avoid importing `lodash` directly.
[@​shahyar](https://redirect.github.com/shahyar) in [#​2045](https://redirect.github.com/apollographql/react-apollo/pull/2045) - When the `Query` `skip` prop is set to `true`, make sure the render prop `loading` param is set to `false`, since we're not actually loading anything.
[@​edorivai](https://redirect.github.com/edorivai) in [#​1916](https://redirect.github.com/apollographql/react-apollo/pull/1916) - No longer building against Node 9
[@​hwillson](https://redirect.github.com/hwillson) in [#​2404](https://redirect.github.com/apollographql/react-apollo/pull/2404) - Make sure ``, `` & `` all support using an Apollo Client instance configured in the `context` or via props.
[@​quentin-](https://redirect.github.com/quentin-) in [#​1956](https://redirect.github.com/apollographql/react-apollo/pull/1956) - Typescript: use `Partial` instead of `TData | {}`, for the `QueryResult` `data` property.
[@​tgriesser](https://redirect.github.com/tgriesser) in [#​2313](https://redirect.github.com/apollographql/react-apollo/pull/2313) - Adjust `` `onCompleted` and `onError` callbacks to be triggered via the `componentDidUpdate` lifecycle method. This ensures these callbacks can be used when data is fetched over the network, and when data is fetched from the local store (previsouly these callbacks were only being triggered when data was fetched over the network). [@​olistic](https://redirect.github.com/olistic) in [#​2190](https://redirect.github.com/apollographql/react-apollo/pull/2190) - Import `lodash/flowRight` using ES import to allow for treeshaking.
[@​Pajn](https://redirect.github.com/Pajn) in [#​2332](https://redirect.github.com/apollographql/react-apollo/pull/2332) - Fixed a regression where `variables` passed in `graphql` HOC `options` were not merged with mutation `variables`.
[@​samginn](https://redirect.github.com/samginn) in [#​2216](https://redirect.github.com/apollographql/react-apollo/pull/2216) - Added a new `partialRefetch` prop (`false` by default). When a `Query` component is mounted, and a mutation is executed that returns the same ID as the mounted `Query`, but has less fields in its result, Apollo Client's `QueryManager` returns the data as an empty Object since a hit can't be found in the cache. This can lead to application errors when the UI elements rendered by the original `Query` component are expecting certain data values to exist, and they're all of a sudden stripped away. The recommended way to handle this is to use the mutations `update` prop to reconcile the mutation result with the data in the cache, getting everything into the expected state. This can definitely be a cumbersome process however, so to help address this the `partialRefetch` prop can be used to automatically `refetch` the original query and update the cache.
[@​steelbrain](https://redirect.github.com/steelbrain) in [#​2003](https://redirect.github.com/apollographql/react-apollo/pull/2003) ### [`v2.1.11`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#2111-August-9-2018) - Fixed an issue in `getDataFromTree` where queries that threw more than one error had error messages swallowed, and returned an invalid error object with circular references. Multiple errors are now preserved.
[@​anand-sundaram-zocdoc](https://redirect.github.com/anand-sundaram-zocdoc) in [#​2133](https://redirect.github.com/apollographql/react-apollo/pull/2133) - Update both the `` component and `graphql` HOC to accept a new `awaitRefetchQueries` prop (boolean). When set to `true`, queries specified in `refetchQueries` will be completed before the mutation itself is completed. `awaitRefetchQueries` is `false` by default, which means `refetchQueries` are usually completed after the mutation has resolved. Relates to Apollo Client.
[PR #​3169](https://redirect.github.com/apollographql/apollo-client/pull/3169).
[@​hwillson](https://redirect.github.com/hwillson) in [#​2214](https://redirect.github.com/apollographql/react-apollo/pull/2214) - Typings adjustment: pass `TData` along into `MutationUpdaterFn` when using `MutationOpts`, to ensure that the updater function is properly typed.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2227](https://redirect.github.com/apollographql/react-apollo/pull/2227) - Check if queryManager is set before accessing it.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2165](https://redirect.github.com/apollographql/react-apollo/pull/2165) ### [`v2.1.9`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#219-July-4-2018) - Added `onCompleted` and `onError` props to the `Query` component, than can be used to register callback functions that are to be executed after a query successfully completes, or an error occurs. [@​jeshep](https://redirect.github.com/jeshep) in [#​1922](https://redirect.github.com/apollographql/react-apollo/pull/1922) - Add `UNSAFE_componentWillMount` SSR support. [@​leops](https://redirect.github.com/leops) in [#​2152](https://redirect.github.com/apollographql/react-apollo/pull/2152) - Clear out scheduler on MockedProvider unmount. [@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2151](https://redirect.github.com/apollographql/react-apollo/pull/2151) ### [`v2.1.8`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#218-June-28-2018) - Addressed deployment issue. ### [`v2.1.7`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#217-June-27-2018) - The `ApolloProvider` `children` prop type has been changed from `element` to `node`, to allow multiple children. [@​quentin-](https://redirect.github.com/quentin-) in [#​1955](https://redirect.github.com/apollographql/react-apollo/pull/1955) - Properly support the new `getDerivedStateFromProps` lifecycle method. [@​amannn](https://redirect.github.com/amannn) in [#​2076](https://redirect.github.com/apollographql/react-apollo/pull/2076) - `lodash` is no longer pinned to version 4.17.10. [@​cherewaty](https://redirect.github.com/cherewaty) in [#​1951](https://redirect.github.com/apollographql/react-apollo/pull/1951) - README updates to replace `apollo-client-preset` with `apollo-boost`. [@​JamesTheHacker](https://redirect.github.com/JamesTheHacker) in [#​1925](https://redirect.github.com/apollographql/react-apollo/pull/1925) - README updates to fix broken links. [@​DennisKo](https://redirect.github.com/DennisKo) in [#​1935](https://redirect.github.com/apollographql/react-apollo/pull/1935) - Project README has been updated to show a `` example. [@​petetnt](https://redirect.github.com/petetnt) in [#​2102](https://redirect.github.com/apollographql/react-apollo/pull/2102) ### [`v2.1.6`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#216-June-19-2018) - Adjust `getDataFromTree` to properly traverse React 16.3's context API provider/consumer approach. [@​marnusw](https://redirect.github.com/marnusw) in [#​1978](https://redirect.github.com/apollographql/react-apollo/pull/1978) - An `ApolloClient` instance can now be passed into a `Mutation` component via a prop named `client`. This prop will override an `ApolloClient` instance set via `context`, by the `ApolloProvider` component. [@​amneacsu](https://redirect.github.com/amneacsu) in [#​1890](https://redirect.github.com/apollographql/react-apollo/pull/1890) - The `ApolloClient` instance used by a Mutation is now available in that Mutation's result. [PR #​1945](https://redirect.github.com/apollographql/react-apollo/pull/1945) [@​cooperka](https://redirect.github.com/cooperka) in [#​1945](https://redirect.github.com/apollographql/react-apollo/pull/1945) ### [`v2.1.5`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#215) - Dependency updates to align with typescript changes made in `apollo-client` 2.3.3 [PR #​2105](https://redirect.github.com/apollographql/react-apollo/pull/2105) ### [`v2.1.4`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#214) - Adds `__typename` for queries made with MockProvider and MockLink ### [`v2.1.3`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#213) - Fixed issue where refetch was not possible after SSR - Fixed overly resubscribing from Subscription and allow passing function to determine shouldResubscribe ### [`v2.1.2`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#212) - Simplified the MockedProvider API [#​1882](https://redirect.github.com/apollographql/react-apollo/pull/1882) - Fixed test-utils export ### [`v2.1.1`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#2111-August-9-2018) - Fixed an issue in `getDataFromTree` where queries that threw more than one error had error messages swallowed, and returned an invalid error object with circular references. Multiple errors are now preserved.
[@​anand-sundaram-zocdoc](https://redirect.github.com/anand-sundaram-zocdoc) in [#​2133](https://redirect.github.com/apollographql/react-apollo/pull/2133) - Update both the `` component and `graphql` HOC to accept a new `awaitRefetchQueries` prop (boolean). When set to `true`, queries specified in `refetchQueries` will be completed before the mutation itself is completed. `awaitRefetchQueries` is `false` by default, which means `refetchQueries` are usually completed after the mutation has resolved. Relates to Apollo Client.
[PR #​3169](https://redirect.github.com/apollographql/apollo-client/pull/3169).
[@​hwillson](https://redirect.github.com/hwillson) in [#​2214](https://redirect.github.com/apollographql/react-apollo/pull/2214) - Typings adjustment: pass `TData` along into `MutationUpdaterFn` when using `MutationOpts`, to ensure that the updater function is properly typed.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2227](https://redirect.github.com/apollographql/react-apollo/pull/2227) - Check if queryManager is set before accessing it.
[@​danilobuerger](https://redirect.github.com/danilobuerger) in [#​2165](https://redirect.github.com/apollographql/react-apollo/pull/2165) ### [`v2.1.0`](https://redirect.github.com/apollographql/react-apollo/blob/HEAD/Changelog.md#210) - Officially release new components!

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.



This PR was generated by Mend Renovate. View the repository job log.