Use chained handling for web requests #49
Labels
in: core
Issues related to config and core support
in: web
Issues related to web handling
type: enhancement
A general enhancement
Milestone
Currently
WebInterceptor
haspreHandle
andpostHandle
methods withMono
return types and eachWebInterceptor
is invoked nested within aflatMap
. That means an interceptor cannot add to the Reactor context of the top-level flow which is where Reactor context gets transferred to thegraphql.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 useflatMap
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 invokesgraphql.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.The text was updated successfully, but these errors were encountered: