Last active
April 22, 2016 22:07
-
-
Save helfer/4a6572c8663a4135301b6192d4043075 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
import { Author } from './connectors'; | |
const resolvers = { | |
Query: { | |
author(_, args) { | |
return Author.find({ where: args }); | |
}, | |
}, | |
Author: { | |
posts(author) { | |
return author.getPosts(); | |
}, | |
}, | |
Post: { | |
author(post) { | |
return post.getAuthor(); | |
}, | |
}, | |
}; | |
export default resolvers; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment