-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Remove Mutation PII while still updating the Cache correctly #2240
Conversation
|
I have to track down this issue and fix the validator.
|
PR Updated:
|
|
…tudio into supernova/425_mutation_pii
Co-Authored-By: Stephen <sirugh@users.noreply.github.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.
Thanks for updating the wiki!
Description
Off the heels of our blog post How to keep sensitive mutation data out of your Apollo cache, this PR updates a few places in PWA Studio where we weren't handling PII and / or the Apollo cache correctly.
Here's a handy mutation PII cheat sheet:
@connection
directivefetchPolicy
tono-cache
no-cache
; The@connection
directive is optional (not needed)fetchPolicy
tono-cache
This PR updates the following places:
setGuestEmailOnCart
no-cache
setShippingAddress
(MiniCart)@connection
directiveSET_SHIPPING_ADDRESS_MUTATION
(v2 Cart)@connection
directivecreateAccount
no-cache
Related Issue
Closes PWA-425.
Acceptance
Verification Stakeholders
@tjwiebell @sirugh
Specification
Verification Steps
Set Guest Email on Cart
Developer Tools
>Application Tab
>Clear Storage
>Clear site data
ROOT_MUTATION
entry in the Apollo Cache does not contain asetGuestEmailOnCart
propertySet Shipping Address (MiniCart)
Developer Tools
>Application Tab
>Clear Storage
>Clear site data
ROOT_MUTATION
entry in the Apollo Cache contains asetShippingAddressesOnCart
property but does not contain any PIISet Shipping Address (v2 Cart)
Developer Tools
>Application Tab
>Clear Storage
>Clear site data
/cart
pageROOT_MUTATION
entry in the Apollo Cache contains asetShippingAddressesOnCart
property but does not contain any PIICreate Account
Developer Tools
>Application Tab
>Clear Storage
>Clear site data
ROOT_MUTATION
entry in the Apollo Cache does not contain acreateCustomer
property (and therefore no PII is present)Screenshots / Screen Captures (if appropriate)
Checklist
I have updated the documentation accordingly, if necessary.
📝 I updated the Coding Standards and Conventions Wiki with the Mutation PII Cheat Sheet above.
I have added tests to cover my changes, if necessary.