Skip to content

Instantly share code, notes, and snippets.

@raed667
Last active March 17, 2017 08:07
Show Gist options
  • Select an option

  • Save raed667/61dc447a8103b9f15ab0d95f945c23bb to your computer and use it in GitHub Desktop.

Select an option

Save raed667/61dc447a8103b9f15ab0d95f945c23bb to your computer and use it in GitHub Desktop.

Revisions

  1. @RaedsLab RaedsLab created this gist Mar 17, 2017.
    32 changes: 32 additions & 0 deletions apolo-vue.vue
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    <template>
    <item v-for='item in hn.topStories' :key='item.id' :item='item'>
    </item>
    </template>

    <style>
    // ...
    </style>
    <script>
    function callback_fn (that) {
    console.log(that)
    }
    export default {
    name: 'item-list',
    props: {
    type: String
    },
    data () {
    return {
    hn: []
    }
    },
    apollo: {
    hn: {
    query: callback_fn(this)
    }
    }
    }
    </script>