Brian Clozel acb182844b Avoid further processing when GraphQL request is cancelled
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.

Closes gh-1153
2025-03-28 15:06:13 +01:00
2025-03-18 14:08:31 +01:00
2025-02-28 18:36:59 +01:00
2025-02-28 14:24:39 +01:00
2025-03-18 11:45:03 +01:00
2025-03-28 09:34:23 +01:00
2025-02-28 18:36:59 +01:00
2023-03-02 12:15:08 +00:00
2025-03-18 11:35:56 +01:00
2025-02-28 14:24:39 +01:00
2024-10-17 16:12:36 +02:00
2020-07-23 09:40:14 +03:00
2025-01-08 21:01:00 +01:00

Spring for GraphQL Build status Revved up by Develocity

GraphQL support for Spring applications with GraphQL Java.

Code of Conduct

This project is governed by the Spring Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to spring-code-of-conduct@pivotal.io.

Contributing

All commits must include a Signed-off-by trailer at the end of each commit message to indicate that the contributor agrees to the Developer Certificate of Origin. For additional details, please refer to the blog post Hello DCO, Goodbye CLA: Simplifying Contributions to Spring.

Documentation

This project has reference documentation (published and source), an API reference. There are samples in the 1.0.x branch that will be moved out into a separate repository.

Stay in Touch

Follow @SpringCentral.

Getting Support

Check out the Spring GraphQL tags on Stack Overflow. Commercial support is available too.

License

This project is released under version 2.0 of the Apache License.

Description
No description provided
Readme 5.9 MiB
Languages
Java 97.9%
CSS 1.2%
Shell 0.7%
HTML 0.2%