You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As raised in #450, cancel signals are not propagated from the transport layer, through the ExecutionGraphQlService, up to the data fetchers provided by the application. This mostly applies to controller handlers with a Publisher-like return type and subscriptions in general. This is due to a well-known CompletableFuture behavior.
We can work around this limitation by propagating this signal out of band through a Sink in the GraphQL context.
The text was updated successfully, but these errors were encountered:
As of gh-1149, CANCEL signals are propagated from the transport request
up to reactive `DataFetcher`s. This efficiently cancels processing and
avoids spending resources when execution results won't be sent to the
client.
Prior to this commit, this would have no effect on non-reactive
`DataFetcher`s because they would still be executed. While we cannot
consistently cancel ongoing blocking operations, we can avoid further
processing and other `DataFetcher`s from being called by returning an
error result instead of the original result.
This commit updates the `ContextDataFetcherDecorator` to detect if the
request has been cancelled and return early a data fetcher result with a
`AbortExecutionException` error instead of the original result.
Closesgh-1153
As raised in #450, cancel signals are not propagated from the transport layer, through the
ExecutionGraphQlService
, up to the data fetchers provided by the application. This mostly applies to controller handlers with aPublisher
-like return type and subscriptions in general. This is due to a well-knownCompletableFuture
behavior.We can work around this limitation by propagating this signal out of band through a
Sink
in the GraphQL context.The text was updated successfully, but these errors were encountered: