Skip to content

Svelte: force-reloading a query #1353

Answered by kitten
trevyn asked this question in Q&A
Discussion options

You must be logged in to vote

You actually shouldn't need to set forceUpdate. Instead the most idiomatic method here is to set requestPolicy to networkOnly: https://formidable.com/open-source/urql/docs/concepts/core-package/

The problem here is partly reactivity in Svelte being a little odd compared to other frameworks as it doesn't appear functional, but all that's being done here is updating the inputs to the query call which will automatically restart it

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kitten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants