Created
May 31, 2018 08:57
-
-
Save maticzav/33e841ec232a10fd45b88ccdb5f4384c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Standalone | |
import { applyMiddleware } from 'graphql-middleware' | |
const schemaWithMiddleware = applyMiddleware( | |
schema, | |
metricsMiddleware, | |
authMiddleware, | |
beepMiddleware, | |
) | |
// using GraphQL Yoga | |
import { GraphQLServer } from 'graphql-yoga' | |
const server = new GraphQLServer({ | |
typeDefs, | |
resolvers, | |
middlewares: [authMiddleware, metricsMiddleware] | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment