Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Update dependency @apollo/react-hooks to v4 #743

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Jul 20, 2020

WhiteSource Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@apollo/react-hooks ^3.0.0 -> ^4.0.0 age adoption passing confidence

Release Notes

apollographql/react-apollo

v4.0.0

Compare Source

⚠️ Deprecation Notice ⚠️

Please note that this is the final version of all React Apollo packages, and that this repository is going to be archived. React Apollo functionality is now directly available from @apollo/client >= 3. While using the @apollo/react-X packages will still work, we recommend using the following imports from @apollo/client directly instead:

  • old: @apollo/react-components --> new: @apollo/client/react/components
  • old: @apollo/react-hoc --> new: @apollo/client/react/hoc
  • old: @apollo/react-ssr --> new: @apollo/client/react/ssr
  • old: @apollo/react-testing --> new: @apollo/client/testing
  • old: @apollo/react-hooks --> new: @apollo/client
Breaking Changes
  • React Apollo 4.0.0 is dependent on @apollo/client >= 3. If you are using apollo-client 2.x and are not ready to update to @apollo/client, please use React Apollo 3.x.

  • The react-apollo package has been fully removed. Please use @apollo/client or @apollo/react-X packages directly.

    @​hwillson in #​4037

  • Due to changes made in Apollo Client, the previous SSR testing pattern of:

    return getDataFromTree(app).then(() => {
      const markup = ReactDOM.renderToString(app);
      expect(markup).toMatch(/Waldo/);
    });

    will no longer work (ReactDOM.renderToString(app) will just return the initial loading state of the component under test). Instead, we can leverage the markup returned when getDataFromTree's Promise resolves:

    return getDataFromTree(app).then((markup) => {
      expect(markup).toMatch(/Waldo/);
    });
  • We are no longer building UMD versions of React Apollo.

v3.1.5

Compare Source

v3.1.4

Compare Source

v3.1.3

Compare Source

  • Revert the changes made in #​3497, which have lead to problems with onCompleted being called more often than necessary.

    @​hwillson in 0901f4a

v3.1.2

Compare Source

Bug Fixes

v3.1.1

Compare Source

Improvements
  • Calling startPolling or stopPolling after a component has unmounted is now a no-op (instead of throwing an exception). Polling is automatically stopped when a component is unmounted, so it doesn't need to be called manually.

    @​hwillson in #​3485
  • Allow ignoreResults to be controlled through graphql and withMutation options.

    @​tim-stasse in #​3431
  • Be a bit more defensive when it comes to accessing the internal
    ObservableQuery instance, to avoid attempting to use it after a component
    has unmounted.

    @​jfrolich in #​3490
Bug Fixes
  • A fix has been applied to prevent an unchanging loading state when an error occurs after a refetch, that is the same as the previous error.

    @​jet2jet in #​3477
  • Add back in the removed ChildDataProps and ChildMutateProps types.

    @​hwillson in #​3495
  • Make sure onCompleted is called each time a useLazyQuery based query completes, after the execution function is called.

    @​hwillson in #​3497

v3.1.0

Compare Source

Potentially Breaking Change
  • Change the default query data state from {} to undefined. This change aligns all parts of the React Apollo query cycle so that data is always undefined if there is no data, instead of data being converted into an empty object. This change impacts the initial query response, initial SSR response, data value when errors occur, data value when skipping, etc. All of these areas are now aligned to only ever return a value for data if there really is a value to return (instead of making it seem like there is one by converting to {}).

    @​hwillson in #​3388
Bug Fixes
  • Adds support for the skip option when using useSubscription.

    @​n1ru4l in #​3356
  • Makes sure refetch, fetchMore, updateQuery, startPolling, stopPolling, and subscribeToMore maintain a stable identity when they're passed back alongside query results.

    @​hwillson in #​3422
  • Fixed problematic re-renders that were caused by using fetchMore.updateQuery with notifyOnNetworkStatusChange set to true. When notifyOnNetworkStatusChange is true, re-renders will now wait until updateQuery has completed, to make sure the updated data is used during the render.

    @​hwillson in #​3433
  • Add client to the useMutation result.

    @​joshalling in #​3417
  • Prevent inline onError and onCompleted callbacks from being part of the internal memoization that's used to decide when certain after render units of functionality are run, when using useQuery. This fixes issues related to un-necessary component cleanup, like error disappearing from results when it should be present.

    @​dylanwulf in #​3419
  • useLazyQuery's execution function can now be called multiple times in a row, and will properly submit network requests each time called, when using a fetch policy of network-only.

    @​hwillson in #​3453
  • SSR enhancements to support network-only and cache-and-network fetch policies, along with changes to ensure disabled SSR queries are not fired.

    @​mikebm in #​3435
  • Remove void from the MutationFunction's returned Promise types.

    @​hwillson in #​3458
  • Prevent duplicate onCompleted calls during the same query execution cycle.

    @​hwillson in #​3461
  • Make sure polling is stopped when a component is unmounted.

    @​dqunbp in #​3273
  • Documentation fixes.

    @​SeanRoberts in #​3380

v3.0.1

Compare Source

Improvements
Bug Fixes
  • Dedupe onError callback calls and ensure refetch sets loading state properly.

    @​hwillson in #​3339
  • Add missing useLazyQuery export to the react-apollo (all) package.

    @​hwillson in #​3320
  • Remove void from being one of the MutationTuple mutate function possible generics. This will make it easier to properly destructure results returned by the mutate function Promise.

    @​hwillson in #​3334
  • Export MockedProviderProps and MockedProviderState from @apollo/react-testing.

    @​hwillson in #​3337
  • Add @types/react as a peer dep, to address potential TS compilation errors when using ApolloProvider.

    @​zkochan in #​3278
  • Make sure error's are maintained after re-renders, when they should be.

    @​hwillson in #​3362

Configuration

📅 Schedule: 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.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box.

This PR has been generated by WhiteSource Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch 3 times, most recently from 5c91062 to 51789fd Compare July 27, 2020 11:09
@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from 51789fd to 4b1784e Compare August 2, 2020 12:30
@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from 4b1784e to 99a3b17 Compare August 11, 2020 18:30
@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from 99a3b17 to 4897275 Compare February 12, 2021 02:55
@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from 4897275 to 645291c Compare June 7, 2021 07:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant