Implementing Middleware
Learn different approaches for implementing middleware.
We'll cover the following...
Applying middleware
When it comes to applying middleware, we have two different approaches available to us. Sometimes we have middleware that we want to apply to very specific fields, or even just one field. A logout mutation, for example, might use middleware to mutate the context and remove the current user. Other times, we want to ensure that a particular middleware is always applied to every field in a certain object or every field that ...