scherbatsky.jr
02/15/2022, 3:48 AMtype Query {
hello: String
}
);
const resolvers = {
hello: (_: any, context: any) => {
console.log(context.session)
return "Hello World"
}
};
app.use('/graphql', verifySession({ sessionRequired: true }), graphqlHTTP(async (req: any, res) => {
return {
schema: graphqlSchema,
rootValue: resolvers,
context: {
session: req.session
}
}
}));``