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

deprecate useFragement returnPartialData option #10764

Merged
merged 3 commits into from May 3, 2023

Conversation

phryneas
Copy link
Member

@phryneas phryneas commented Apr 14, 2023

This is an alternative to #10760 and would address #10650.

It would mark the returnPartialData option of useFragement as @deprecated in v3.7. Once that has moved in and is merged into 3.8, I will add another PR that removes the option.

This also adds test for the current default value of true (which was documented as false until now, by inheriting from other options interfaces) and the behaviour of throwing an error in case of incomplete data with returnPartialData: false - which was not intended, but would IMHO be too much of a change to be fixed within 3.7.

Checklist:

  • If this PR contains changes to the library itself (not necessary for e.g. docs updates), please include a changeset (see CONTRIBUTING.md)
  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@changeset-bot
Copy link

changeset-bot bot commented Apr 14, 2023

🦋 Changeset detected

Latest commit: d0b1fa5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@apollo/client Patch

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

@netlify
Copy link

netlify bot commented Apr 14, 2023

Deploy Preview for apollo-client-docs ready!

Name Link
🔨 Latest commit d0b1fa5
🔍 Latest deploy log https://app.netlify.com/sites/apollo-client-docs/deploys/645255969331290008989ae6
😎 Deploy Preview https://deploy-preview-10764--apollo-client-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@phryneas phryneas force-pushed the pr/deprecate-useFragment-returnPartialData branch from 885a02e to 98ec144 Compare April 14, 2023 10:39
@phryneas phryneas requested review from alessbell, benjamn and jerelmiller and removed request for alessbell April 14, 2023 10:55
Copy link
Member

@alessbell alessbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

Copy link
Member

@jerelmiller jerelmiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks great! Spotted a couple typos. Thanks for creating this PR!

.changeset/brave-buttons-grab.md Outdated Show resolved Hide resolved
src/react/hooks/__tests__/useFragment.test.tsx Outdated Show resolved Hide resolved
src/react/hooks/__tests__/useFragment.test.tsx Outdated Show resolved Hide resolved
src/react/hooks/useFragment.ts Outdated Show resolved Hide resolved
Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
@phryneas phryneas self-assigned this Apr 17, 2023
@phryneas phryneas merged commit 1b0a61f into main May 3, 2023
10 checks passed
@github-actions github-actions bot mentioned this pull request May 3, 2023
@jerelmiller jerelmiller deleted the pr/deprecate-useFragment-returnPartialData branch May 3, 2023 14:13
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 3, 2023
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.

None yet

3 participants