Created
June 22, 2019 19:42
-
-
Save chris001177/b6cd17973d3d0bde678058064616ef8b 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
addComment (_, args, context) { | |
// make sure user is authenticated | |
if (!context.user) { | |
throw new Error('You are not authorized!') | |
} | |
// user is authenticated, continue with adding comment | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment