Skip to content

Instantly share code, notes, and snippets.

@TimMikeladze
Created May 23, 2017 20:04
Show Gist options
  • Save TimMikeladze/d75a969e6d588e745a79ce74e61dba74 to your computer and use it in GitHub Desktop.
Save TimMikeladze/d75a969e6d588e745a79ce74e61dba74 to your computer and use it in GitHub Desktop.
app.use('/graphql', graphqlExpress(async (req) => {
const userId = req.userId;
const user = await db.findUserById(userId)
return {
schema,
context: {
user
},
};
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment