-
Notifications
You must be signed in to change notification settings - Fork 117
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
Bug with type policies for local fields with arguments #349
Comments
Here's a live version of the reproduction: |
New version was released with completely different client. |
I've updated the reproduction app https://happy-swirles-40f055.netlify.app/ I'm using (side note, why the frequent package name changes?) |
@bennypowers I do not have access to the original package when publishing and we still use apollo in some projects and often bump package dependencies so two packages need to exist. And original package cannot be used because original maintainer left and it is not responding to emails etc. |
I see. If that's the case, I recommend contacting npm support. explain the situation with the original maintainer, link to this repo, and they should be able to give you control of the name on the npm registry |
@bennypowers I have been doing Open Source for last 10 years and this is the best reproduction project I have seen so far (seen many). I have a feeling that this issue can be created inside Apollo's client. I end up debugging this but struggling to get a sense from it. I will try to take some time to understand the problem and see if we can get it done. We have landed new fix to master. Going to release it today. |
New version released. |
New version looks nice, but unfortunately did not fix the behaviour I'm noticing: |
Cache persist stores state only. I suspect that policy is not reexecuted on cache restore somehow. Need to isolate problem to confirm it, but that will explain it. Can you tell me what is improper behaviour. |
Steps to Reproduce
Repro repo:
https://github.com/bennypowers/cache-persist-client-args-repro
There's full code and more detailed explanations there in the README.
Description
Say you had a local field
selected(page: $page) @client
and a type policy which stored the value ofselected
based on whether and which page id was present.If the cache is persisted, this code will run as expected on first page load (
selected
state will remain scoped to the page variable, if there is one). But users will see unexpected behaviour on subsequent loads, when the persisted cache is loaded up.The text was updated successfully, but these errors were encountered: