Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency react-apollo to v3 #10

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

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented May 9, 2021

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-apollo ^2.1.9 -> ^3.0.0 age adoption passing confidence

Release Notes

apollographql/react-apollo (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

v3.0.0

Compare Source

Overview

This major release includes a large refactoring of the existing React Apollo codebase, to introduce new improvements, changes, features and bug fixes. The biggest new features are:

  • Provides new useQuery, useLazyQuery, useMutation, useSubscription, and useApolloClient hooks, following React's Hooks API.
  • Maintains support for React Apollo's graphql HOC and render proper components.
  • Introduces a new monorepo structure, with separately published packages, making it easier to use just the parts of React Apollo you're interested in:
    • @apollo/react-common
    • @apollo/react-hooks
    • @apollo/react-components
    • @apollo/react-hoc
    • @apollo/react-ssr
    • @apollo/react-testing
  • Thorough codebase pruning and cleaning to reduce the overall React Apollo bundle size.
  • And more!

Consult the Hooks migration guide for more details around upgrading. For more information regarding how to use the new hooks, please consult the updated React Apollo docs (all docs have been updated to be hooks first).

Breaking Changes
  • The minimum supported React version is now 16.8.

  • The react-apollo@3 package preserves most of the functionality of react-apollo@2 by re-exporting existing components and functions from @apollo/react-components and @apollo/react-hoc. If you want to use Hooks, Components, or HOC directly, import the new @apollo/react-hooks, @apollo/react-components, and/or @apollo/react-hoc packages instead.

  • React Apollo testing utilities are no longer available as part of the react-apollo package. They should now be imported from the new @apollo/react-testing package.

  • The deprecated walkTree function has been removed (9b24d756).

  • The deprecated GraphqlQueryControls and MutationFunc types have been removed (ade881f0).

  • Preact is no longer supported (b742ae63).

  • Various Typescript type changes. Since we've introduced a third way of managing data with React (Hooks), we had to rework many of the existing exported types to better align with the Hooks way of doing things. Base types are used to hold common properties across Hooks, Components and the graphql HOC, and these types are then extended when needed to provide properties that are specific to a certain React paradigm
    (30edb1b0 and
    3d138db3).

  • catchAsyncError, wrap, and compose utilities have been removed
    (2c3a262, 7de864e, and e6089a7).

    Previously, compose was imported then exported directly from lodash using flowRight. To keep using compose, install the lodash.flowright package, then update your compose imports as:

    import compose from 'lodash.flowright';
  • Render prop components (Query, Mutation and Subscription) can no longer be extended. In other words, this is no longer possible:

    class SomeQuery extends Query<SomeData, SomeVariables> {}

    All class based render prop components have been converted to functional components, so they could then just wrap their hook based equivalents (useQuery, useMutation, useSubscription).

    While we recommend switching over to use the new hooks as soon as possible, if you're looking for a stop gap you can consider typing a Query component in a similar fashion, like:

    export const SomeQuery = () => (
      <Query<SomeData, SomeVariables> query={SOME_QUERY} ...>
        {({ data }) => {
          return <div> ... things happen... </div>;
        }}
      </Query>
    );

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.

🔕 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 Mend Renovate. View repository job log here.

@renovate
Copy link
Author

renovate bot commented May 9, 2021

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻️ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you check the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-app-manjula@0.1.0
npm ERR! Found: graphql@0.13.2
npm ERR! node_modules/graphql
npm ERR!   graphql@"^0.13.2" from the root project
npm ERR!   peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-client@2.6.10
npm ERR!   node_modules/apollo-client
npm ERR!     apollo-client@"^2.3.7" from the root project
npm ERR!     peer apollo-client@"^2.6.4" from react-apollo@3.1.5
npm ERR!     node_modules/react-apollo
npm ERR!       react-apollo@"3.1.5" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.3.1" from react-apollo@3.1.5
npm ERR! node_modules/react-apollo
npm ERR!   react-apollo@"3.1.5" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /tmp/renovate-cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate-cache/others/npm/_logs/2021-05-15T19_32_38_344Z-debug.log

@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from d5f1fbd to fab111c Compare May 15, 2021 19:32
@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from fab111c to d98fa03 Compare September 25, 2022 13:13
@renovate
Copy link
Author

renovate bot commented Sep 25, 2022

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm WARN old lockfile 
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile 
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: my-app-manjula@0.1.0
npm ERR! Found: graphql@0.13.2
npm ERR! node_modules/graphql
npm ERR!   graphql@"^0.13.2" from the root project
npm ERR!   peer graphql@"^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" from apollo-client@2.6.10
npm ERR!   node_modules/apollo-client
npm ERR!     apollo-client@"^2.3.7" from the root project
npm ERR!     peer apollo-client@"^2.6.4" from react-apollo@3.1.5
npm ERR!     node_modules/react-apollo
npm ERR!       react-apollo@"^3.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^14.3.1" from react-apollo@3.1.5
npm ERR! node_modules/react-apollo
npm ERR!   react-apollo@"^3.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/renovate-cache/others/npm/_logs/2022-11-20T21_01_37_665Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in:
npm ERR!     /tmp/renovate-cache/others/npm/_logs/2022-11-20T21_01_37_665Z-debug-0.log

@renovate renovate bot force-pushed the renovate/major-apollo-graphql-packages branch from d98fa03 to d2c23cf Compare November 20, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants