Open benjie opened 5 years ago
thanks again for the pointer benjie, here it is with the few missing backticks, for the next guy that will paste this in and might be wondering...
apollo: {
$subscribe: {
tagAdded: {
query: gql`subscription {listen(topic: "hello"){relatedNodeId}}`,
// Reactive variables
variables () {
// This works just like regular queries
// and will re-subscribe with the right variables
// each time the values change
return {
type: this.type,
}
},
// Result hook
result (data) {
console.log(data)
},
},
},
}
https://discordapp.com/channels/489127045289476126/498852330754801666/560214820121739285