I'm not seeing the \"cancel\" signal being propagated up the chain and my DataFetcher is not cancelled as a result.
\nI think #75 is somewhat related, but I'm wondering if this is the expected behavior or if I can implement a custom component to achieve that goal. Is the message lost in the AsyncExecutionStrategy?
For background, Spring for GraphQL is trying to provide/document an interceptor for timeouts, but it seems that the \"cancel\" signal is lost along the way in GraphQL. This defeats a bit the purpose, as there is no way to cancel expensive calls if the execution has been cancelled.
I am not an expert in Future cancellation but I was under the impression that CompletableFuture does NOT propagate a signal upwards to stop a chained CF
\nre: elements from https://stackoverflow.com/questions/65539126/whats-the-intended-pattern-of-canceling-already-running-completablefutures
\nand
\nhttps://nurkiewicz.com/2015/03/completablefuture-cant-be-interrupted.html
\nI did some local testing and chained CFs do not interrupt.
\nIt would take a library like say https://github.com/vsilaev/tascalate-concurrent and its \"dependent promises\" for this to happen I suspect.
\nBut if I am wrong here I am happy to be corrected and guided.
","upvoteCount":1,"url":"https://github.com/graphql-java/graphql-java/discussions/3691#discussioncomment-10447699"}}}-
|
Assuming I have registered I'm not seeing the "cancel" signal being propagated up the chain and my For background, Spring for GraphQL is trying to provide/document an interceptor for timeouts, but it seems that the "cancel" signal is lost along the way in |
Beta Was this translation helpful? Give feedback.
-
|
I am not an expert in Future cancellation but I was under the impression that CompletableFuture does NOT propagate a signal upwards to stop a chained CF re: elements from https://stackoverflow.com/questions/65539126/whats-the-intended-pattern-of-canceling-already-running-completablefutures and https://nurkiewicz.com/2015/03/completablefuture-cant-be-interrupted.html I did some local testing and chained CFs do not interrupt. It would take a library like say https://github.com/vsilaev/tascalate-concurrent and its "dependent promises" for this to happen I suspect. But if I am wrong here I am happy to be corrected and guided. |
Beta Was this translation helpful? Give feedback.
I am not an expert in Future cancellation but I was under the impression that CompletableFuture does NOT propagate a signal upwards to stop a chained CF
re: elements from https://stackoverflow.com/questions/65539126/whats-the-intended-pattern-of-canceling-already-running-completablefutures
and
https://nurkiewicz.com/2015/03/completablefuture-cant-be-interrupted.html
I did some local testing and chained CFs do not interrupt.
It would take a library like say https://github.com/vsilaev/tascalate-concurrent and its "dependent promises" for this to happen I suspect.
But if I am wrong here I am happy to be corrected and guided.