Skip to content

Instantly share code, notes, and snippets.

@wojciech-bilicki
Created April 12, 2018 08:29
Show Gist options
  • Save wojciech-bilicki/04aaff167e1cbcf47c98f5745e586f35 to your computer and use it in GitHub Desktop.
Save wojciech-bilicki/04aaff167e1cbcf47c98f5745e586f35 to your computer and use it in GitHub Desktop.
Query author
Query: {
authors: () => {
return authorModel.find()
},
author: (root, args) => {
const id = args.id;
return authorModel.findOne({id: id});
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment