You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok I think i have the basics working.. hopefully this helps someone:
loadSchema with my typeDefs and resolvers wasn't working (it didn't merge my schema/resolvers with the Auth ones.
import{ApolloServer}from'apollo-server-express'import{WebApp}from'meteor/webapp'import{getUser}from'meteor/apollo'import{initAccounts}from'meteor/nicolaslopezj:apollo-accounts'import{getSchema}from'graphql-loader'importtypeDefsfrom'./schema'importresolversfrom'./resolvers'// Load all accounts related resolvers and type definitions into graphql-loaderinitAccounts({loginWithFacebook: false,loginWithGoogle: true,loginWithLinkedIn: false,loginWithPassword: true})constAuthSchema=getSchema()constserver=newApolloServer({typeDefs: [...typeDefs,AuthSchema.typeDefs],resolvers: [resolvers,AuthSchema.resolvers],context: async({ req })=>({user: awaitgetUser(req.headers.authorization)})})server.applyMiddleware({app: WebApp.connectHandlers,path: '/graphql'})WebApp.connectHandlers.use('/graphql',(req,res)=>{if(req.method==='GET'){res.end()}})
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?
The text was updated successfully, but these errors were encountered: