-
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
Read field policy ignored #9293
Comments
Hi @CarsonF 👋🏻 thanks for your patience! Do you still need support here? If so, I'm not 100% certain what we might be able to do with the info given - can you share a runnable reproduction so we can see the issue on our end? Thanks so much! |
Ha it's been a bit; I'll have to refresh myself. I'll see if I can come up with a repro this week. |
Hey @bignimbus I was able to distill a reproduction here: https://github.com/CarsonF/apollo-reproduction-read-policy-ignored If you just add a single person in the example you'll see that the field policy to convert the string to a Date object is skipped for the list. |
hi what's the latest status on this issue? |
Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Client usage and allow us to serve you better. |
Hello @alessbell just checking to see if you know - is there any update on this possibly? |
Hi @mikevoets! No update at this time - we're in the midst of conference season and tackling some other priorities like data masking, but I've added this to our next meeting agenda so we can revisit it. Thanks for the nudge. |
Setup:
Engagement.createdAt
to convert it from an ISO string to a Date object.Problem:
update
function that adds the new product toproducts.items
array and increments thetotal
count.id
, but not thelabel
property.Engagement
detail page, the query determines it doesn't have all the data and makes a network request.read
function on the field policy is ignored once the server data is retrieved.createdAt
to be a Date object but it is a string.Related reproduction/workaround notes
label
property, causes the query return data from cache with theread
policy applied.cache.modify()
call on the product create mutation updater function this doesn't happen - because the cached data for the query is still complete I'm assuming.Intended outcome:
read function on field policy should be used after network request finishes to resolve the complete data requested in query.
Actual outcome:
read function on field policy is never invoked.
How to reproduce the issue:
Versions
The text was updated successfully, but these errors were encountered: