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

[Data masking] Allow null as a valid from value #12131

Open
wants to merge 4 commits into
base: jerel/fix-unmask-migrate-bug
Choose a base branch
from

Conversation

jerelmiller
Copy link
Member

While trying out data masking with the Spotify showcase, I discovered some cases where it was a bit difficult to adopt data masking without some significant refactors. For example, see apollographql/spotify-showcase@a24c3ed. In this component, I had to split out a fallback component and a component that renders the non-null case simply because we can't conditionally render hooks and null is not a valid from value in useFragment. By adding support for null, it should make data masking a bit easier to adopt by avoiding these types of refactors where a fallback state is perfectly valid.

Copy link

changeset-bot bot commented Nov 14, 2024

🦋 Changeset detected

Latest commit: 94e0f01

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 Minor

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

@svc-apollo-docs
Copy link

svc-apollo-docs commented Nov 14, 2024

✅ Docs Preview Ready

No new or changed pages found.

Copy link

pkg-pr-new bot commented Nov 14, 2024

npm i https://pkg.pr.new/@apollo/client@12131

commit: 94e0f01

@jerelmiller
Copy link
Member Author

Here is the updated component with this change: apollographql/spotify-showcase@c630fa9

Much cleaner and required much less updating.

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.

2 participants