Add middlewares to implement customizable logic around different stages of query execution.
Use cases:
- Distributed tracing
- Gathering metrics (rate/duration per query, in-flight queries, etc)
- Custom logic before/after query execution (action log, field authorization, etc)
For that purpose I propose to add next middlewares:
- OperationMiddleware
- RootFieldMiddleware
- FieldMiddleware
- ResponseMiddleware
These middlewares are used in gqlgen.
If this approach is not valid could you advise how to inject custom logic before different stages of query execution ?
If proposed approach is valid I could reopen PR #284 (and add one more with RootFieldMiddleware).
Add middlewares to implement customizable logic around different stages of query execution.
Use cases:
For that purpose I propose to add next middlewares:
These middlewares are used in gqlgen.
If this approach is not valid could you advise how to inject custom logic before different stages of query execution ?
If proposed approach is valid I could reopen PR #284 (and add one more with RootFieldMiddleware).