#Is there a way to cancel cell http requests?

1 messages · Page 1 of 1 (latest)

sour fiber
#

Can't find that in the docs

slender dagger
#

May I ask the use case? If you don’t want to render the results could you not set some cancellation flag and then not render the data if that’s set?In effect, just throw away the results

#

Or do you actually want to cancel the api request so the service cancels? That’s much more complicated and not sure possible

sour fiber
#

I want to actually cancel, in case the user clicks off the site or changes an input parameter

slender dagger
#

How do you imagine a service once it starts querying or updating data can be cancelled and roll back a transaction? Regardless of if the cancellation is done from the web side or anywhere else?

sour fiber
#

posts should never be cancelled afaik

#

so queries only

#

the backend shouldn't care, where the cancellation comes from, at least with http it's angnostic

#

not sure I get the rest

slender dagger
#

I think there is a distinction between “cancel request” and “throwaway or ignore or don’t send response”. What’s the fundamental user experience you are looking to solve or improve?

sour fiber
#

I have a time control on the top, which you can quickly change and a table below, that needs very long to load. And basically it shouldn't load anymore, if you change the time control.

loud mesa
#

you probably want to work at a different API abstraction than cells for that query, and pass along an AbortController reference to Apollo that you can emit the cancellation from

sour fiber
#

probably, but not sure if that would be as convinient