-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Aborting fetch requests #7152
Comments
@fusion2004 ember-data supports You would need https://github.com/ember-cli/ember-fetch installed. An example of what you might need to make it work:
|
this is complicate because some requests, when aborted, will cascade errors through the store state that we likely aren't prepared for. We would want to add some handling in the fetch-manager we have internally to cleanup after an abort. I am interested in the behavior, and I'd be happy to assist in a spike to prove we could do it, but would require an RFC to make fully public. If error states on records/requests doesn't matter to your app though, you can totally do this today by implementing your own adapter(s) with an abort signal and sending it when you cancel a transition. |
We hacked Ultimately, since the store calls Point being, this behavior really needs to be implemented in Ember Data since it's Ember Data itself that calls adapters. I think I'd be up for writing an RFC for this one. It might help me learn the internals better too. |
I'd be interested as well @DingoEatingFuzz |
Closing in favor of emberjs/rfcs#860 which as AbortController built in |
Would it be possible to set up a way to use an
AbortController
to abort fetch requests?I'm interested in having the ember-data fetches that are triggered in model hooks in Ember be aborted if the route transition is aborted.
If this is something wanted in
ember-data
, I'd love to help implement it but I have no idea where to start, or if it's even possible right now.The text was updated successfully, but these errors were encountered: