Skip to content

Instantly share code, notes, and snippets.

@LazyFatArrow
Created May 29, 2019 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LazyFatArrow/38b9937dc11f9e66433239f253b271bc to your computer and use it in GitHub Desktop.
Save LazyFatArrow/38b9937dc11f9e66433239f253b271bc to your computer and use it in GitHub Desktop.
<template>
<-- ...html -->
</template>
<script>
import { POLLS } from '@/gql/queries/poll.queries'
import { VOTE_ON_POLL } from '@/gql/mutations/poll.mutations'
import { OPTION_VOTED } from '@/gql/subscriptions/poll.subscriptions'
import SinglePoll from '@/components/SinglePoll.vue'
export default {
components: {
SinglePoll,
},
apollo: {
polls: {
query: POLLS,
subscribeToMore: {
document: OPTION_VOTED,
}
}
},
// ... code
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment