-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Remove unsupported client.query options
#12562
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
Conversation
🦋 Changeset detectedLatest commit: 4cc52d8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
commit: |
size-limit report 📦
|
c9c81a7 to
5b1e718
Compare
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for apollo-client-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
| }); | ||
|
|
||
| describe("when notifyOnNetworkStatusChange is set", () => { | ||
| it("does not save the data to the cache on success", async () => { |
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.
These are identical to some tests above with the exception that notifyOnNetworkStatusChange was passed to client.query. With this option removed, these tests no longer made sense to keep around.
phryneas
left a comment
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.
Less undefined behaviour - always happy about that :)
| "to receive multiple results from the cache and the network, or consider " + | ||
| "using a different fetchPolicy, such as cache-first or network-only." | ||
| ); | ||
|
|
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.
Do we want to consider wrapping all these invariants in __DEV__?
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.
Yes! I like that idea.
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.
…rkStatusChange from QueryOptions
cbc105c to
dc62585
Compare
pollIntervalandreturnPartialDatawere options supported by theQueryOptionstype used byclient.queryeven though these options threw at runtime. These have been removed in theQueryOptionstype in this PR.notifyOnNetworkStatusChangewas also an option that was supported, though its effects were not observable byclient.query. I've removed support for this and runtime will now throw if this is set.I've also removed support for the
standbyfetch policy forclient.query. This fetch policy made no sense since it doesn't fetch and just returns{ data: undefined }. An error will be thrown at runtime if this is set.