Replies: 1 comment 2 replies
-
Actually I feel there's more problem with the global store. Is it true that I need to reset store manually before triggering a new query() call? Otherwise, when the query is still in-flight, the store still serves stale data. Should the store be somehow keyed by query input, like cache is? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I'm still on kitql 0.6.7 and having an issue with rendering wrong data. In my svelte routes, I use .query() to trigger GQL queries and use stores generated by kitql to render. This is convenient.
The problem is that if I switch back and forth in routes, the same GQL queries can be triggered with different parameters. Since the store generated for a query is global, it can be loaded with non-deterministic data (depending on which query returned last).
I thought I needed to cancel in-flight requests before triggering new ones, but haven't figured out how to do that. Comments are appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions