Skip to content

Vue subscriptions example #119

@benjie

Description

@benjie
 apollo: {
    $subscribe: {
        tagAdded: {
        query: gqlsubscription test{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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions