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
...
constresolvers={Query: {add: async(_,{ x, y },context)=>{// do you need the request object?console.log(context.reply.request)returnx+y}}}...
Build a custom GraphQL context object
...
constresolvers={Query: {me: async(obj,args,ctx)=>{// access user_id in ctxconsole.log(ctx.user_id)}}}app.register(mercurius,{schema: makeExecutableSchema({ typeDefs, resolvers }),context: (request,reply)=>{// Return an object that will be available in your GraphQL resolversreturn{user_id: 1234}}})...