graphQL-middleware-helper
A small helper that prevents you from having to type this
const authMiddleWare = Query: books: isAuthed todos: isAuthed someOtherResolver: isAuthed Me: isAuthed
And instead lets u do this
// Will apply middleware to all resolversconst authMiddleWare = // Will apply middleware to all resolvers except all Mutation resolversconst authMiddleWare = // Will only apple middleware to the Query -> book and Query -> todos resolversconst authMiddleWare =
Install
yarn add graphql-middleware-helper
npm install --save graphql-middleware-helper