-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hi, I'm quite new to apollo and trying to get meteor accounts access setup through graphQL.
How do I go about using the latest apollo instructions in conjunction with this package?
import { ApolloServer, gql } from 'apollo-server-express'
import { WebApp } from 'meteor/webapp'
import { getUser } from 'meteor/apollo'
import typeDefs from './schema'
import resolvers from './resolvers'
const server = new ApolloServer({
typeDefs,
resolvers,
context: async ({ req }) => ({
user: await getUser(req.headers.authorization)
})
})
server.applyMiddleware({
app: WebApp.connectHandlers,
path: '/graphql'
})
WebApp.connectHandlers.use('/graphql', (req, res) => {
if (req.method === 'GET') {
res.end()
}
})
Metadata
Metadata
Assignees
Labels
No labels