How To Add Multiple Middleware to specific GraphQL query #554
Unanswered
riverafernando
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If wanted to add more than one middleware for a specific graphql query, what is the best way to do that?
For example:
Here the
beepMiddleware
is ran before thehello
resolver, what would I need to do add another middleware for thathello
query, perhaps a new middleware that runs afterbeepMiddleware
but before getting resolved by the resolver. One way I can see do it is to create another middleware object likebeepMiddleware
and put it before thebeepMiddleware
arg in theapplyMiddleWare
call, is this the correct way to go about it, thanks.Beta Was this translation helpful? Give feedback.
All reactions