Skip to content
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

Use chained handling for web requests #49

Closed
rstoyanchev opened this issue Apr 29, 2021 · 0 comments
Closed

Use chained handling for web requests #49

rstoyanchev opened this issue Apr 29, 2021 · 0 comments
Assignees
Labels
in: core Issues related to config and core support in: web Issues related to web handling type: enhancement A general enhancement
Milestone

Comments

@rstoyanchev
Copy link
Contributor

Currently WebInterceptor has preHandle and postHandle methods with Mono return types and each WebInterceptor is invoked nested within a flatMap. That means an interceptor cannot add to the Reactor context of the top-level flow which is where Reactor context gets transferred to the graphql.ExecutionInput.

If we switched to a chained handling model with delegation, like with WebFilter in WebFlux, that issue should go away, we won't need to use flatMap to connect the interceptors, and it would be more convenient to write an interceptor since "before" handling won't have to use any operators, e.g. if it doesn't do anything asynchronous.

One additional benefit of turning this into a chain is that we can have an independent GraphQLService at the end of the chain that invokes graphql.GraphQL and possibly has other invocation related behavior like the transfer of Reactor Context. Such a shared service could then be invoked through the Web layer, or through anything else.

@rstoyanchev rstoyanchev added type: enhancement A general enhancement in: core Issues related to config and core support in: boot-starter in: web Issues related to web handling labels Apr 29, 2021
@rstoyanchev rstoyanchev added this to the 0.1.0 milestone Apr 29, 2021
@rstoyanchev rstoyanchev self-assigned this Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues related to config and core support in: web Issues related to web handling type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant