Created
December 20, 2018 18:43
-
-
Save redbluenat/7d1c5fac2f7e7f84a32bce0979a128da to your computer and use it in GitHub Desktop.
index.js
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
const Mutation = require('./Mutations'); | |
const resolvers = { | |
Query: { | |
dogName: () => `Tommy the chihuahua`, | |
dogs: (root, args, context, queryInfo) => { | |
return context.db.query.dogs({}, queryInfo); | |
}, | |
user: (root, args, context, info) => { | |
return context.db.query.user({ where: { id: root.user.id } }, info); | |
} | |
}, | |
Mutation | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment