-
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
[Data masking] Add @unmask
directive with field access warnings
#11919
Conversation
|
24b0f20
to
bead73f
Compare
ccce8ac
to
5d0f2ad
Compare
@unmask
directive@unmask
directive with field access warnings
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.
I had a bunch of suggestions, but I'd also be fine with it as it is.
Closes #11674
Closes #11673
Adds support for an
@unmask
directive that disables data masking for a named fragment when data masking is enabled in the client.This directive will be most useful for migration when adopting data masking. As such, we've added the ability to emit warnings when using a
mode
argument set tomigrate
:When accessing
data.currentUser.name
, the user will see a warning in the console about accessing an unmasked field. Using@unmask
without themode
argument won't emit warnings.It is also possible to mix and match fragment subtrees with
@unmask
which allows a user to migrate a subtree at a time.