timhall / svelte-apollo

Svelte integration for Apollo GraphQL
MIT License
947 stars 68 forks source link

svelte-observables causing PendingBlock to render on fetchMore/updateQuery etc... #70

Closed SamJacobs closed 3 years ago

SamJacobs commented 3 years ago

I'm using 0.3.0 (is 0.4.0 published yet?) and I'm having an issue where scrolled divs with nodes in them will lose scroll position when query.fetchMore is called.

It looks like it's because it is treating the observableQuery in the await block as if it is brand new and hasn't been previously resolved, so it removes the ThenBlock and rerenders the PendingBlock before quickly rendering the ThenBlock again. I can't say for sure but this is what I've gathered.

@timhall is this a known issue with svelte-observables? Any fix/workaround?

SamJacobs commented 3 years ago

This is moot with version 0.4.0 👍