Newer
Older
const { graphqlUploadExpress } = require('graphql-upload')
const createGraphQLServer = require('./graphqlServer')
const api = app => {
app.use(
'/graphql',
app.locals.passport.authenticate(['bearer', 'anonymous'], {
session: false,
}),
)
app.use(graphqlUploadExpress())
server.applyMiddleware({ app, cors: CORSConfig })
}
module.exports = api