Created
November 23, 2017 13:24
-
-
Save DomDumont/d07f2264dd9343b84ec9bb9e10498def to your computer and use it in GitHub Desktop.
This file contains hidden or 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
signinUser: async (root, data, {mongo: {Users}}) => { | |
const user = await Users.findOne({email: data.email.email}); | |
if (data.email.password === user.password) { | |
return {token: `token-${user.email}`, user}; | |
} | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment