-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Feature: add ability to refetch certain queries imperatively #7431
Feature: add ability to refetch certain queries imperatively #7431
Conversation
@dannycochran: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking good! Thanks for adding tests. Just a couple of ideas to eliminate/consolidate even more code.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
This is obviously a breaking change for client.refetchQueries, but that method was introduced in PR #7431, targeting the release-3.4 branch. Since Apollo Client v3.4 is still in beta, we still have room to rework the signature of the client.refetchQueries method (introduced in #7431 and released in @apollo/client@3.4.0-beta.3), not only adding significant new functionality like options.updateCache and options.onQueryUpdated, but also leaving room to add functionality more easily in the future, without breaking backwards compatibility, since client.refetchQueries takes named options and returns an object of named results, so adding new options or returning new results never needs to be a breaking change.
Checklist:
Relevant issue:
#7410
This is a WIP, I still need to write tests. But I wanted to start the convo about how this would look.