Replies: 2 comments
-
I'd like to know the answer to this as well. |
Beta Was this translation helpful? Give feedback.
0 replies
-
It would depend on the integration you are using to expose async-graphql, for instance with axum (or anything built on top of struct AbortRunningRequest {}
impl Drop for AbortRunningRequest {
fn drop(&mut self) {
// ...
}
}
let service = ServiceBuilder::new()
.service_fn(move |req: Request<Body>| async move {
/// When the request is cancelled, this struct will be drop which will send a
/// cancel signal to stop the processing.
let _abort = AbortRunningRequest {};
// ...
}); (It would not really indicate the end of the connection, but the end of the handling of the service by tower, if you really need to know when it's the end of the connection you need to deal with |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How would I listen for when the connection is closed early? (AbortController use on frontend)
Beta Was this translation helpful? Give feedback.
All reactions