Created
June 8, 2018 15:35
-
-
Save daniele-zurico/66d0c510b8c75b6e8052ed6b54d6c1a6 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
| import { userController } from "../controllers/controllers"; | |
| import { AuthenticationError } from "apollo-server"; | |
| const userResolver = { | |
| Query: { | |
| posts(root: any, args: any, context: any) { | |
| return userController.posts(); | |
| }, | |
| users(root: any, args: any, context: any) { | |
| return userController.users(root, args.user); | |
| }, | |
| validateUser(root: any, args: any) { | |
| return userController.findOrCreateUser(args.idToken); | |
| } | |
| } | |
| }; | |
| export default userResolver; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment