Skip to content

Instantly share code, notes, and snippets.

@daniele-zurico
Created June 8, 2018 15:35
Show Gist options
  • Select an option

  • Save daniele-zurico/66d0c510b8c75b6e8052ed6b54d6c1a6 to your computer and use it in GitHub Desktop.

Select an option

Save daniele-zurico/66d0c510b8c75b6e8052ed6b54d6c1a6 to your computer and use it in GitHub Desktop.
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