Created
May 23, 2017 20:04
-
-
Save TimMikeladze/d75a969e6d588e745a79ce74e61dba74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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