Created
May 15, 2019 23:54
-
-
Save LazyFatArrow/f980953fbb5c1d71039bcb92d64f9f06 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 * as pollService from '../services/poll.service' | |
export default { | |
queries: { | |
polls() { | |
return pollService.findAll().catch() | |
} | |
}, | |
mutations: { | |
createPoll(parent, args) { | |
return pollService.create(args.poll).catch(); | |
}, | |
voteOnPoll(parent, args) { | |
return pollService.voteOnPoll(args.optionId).catch(); | |
} | |
}, | |
subscriptions: {}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment