Skip to content

Dollar Apollo

This is the Apollo manager added to any component that uses Apollo. It can be accessed inside a component with this.$apollo.

Properties

  • vm: related component
  • queries: object map of the component's Reactive Queries.
  • subscriptions: object map of the component's Reactive Subscriptions.
  • provider: injected Apollo Provider.
  • loading: whether at least one query is loading.
  • skipAllQueries: (setter) boolean to pause or unpause all Reactive Queries.
  • skipAllSubscriptions: (setter) boolean to pause or unpause all Reactive Subscriptions.
  • skipAll: (setter) boolean to pause or unpause all Reactive Queries and Reactive Subscriptions.

Methods

  • query: execute a query (see Queries).
  • mutate: execute a mutation (see Mutations).
  • subscribe: standard Apollo subscribe method (see Subscriptions).
  • addSmartQuery: manually add a Reactive Query (not recommended).
  • addSmartSubscription: add a Reactive Subscription (see Subscriptions).
  • getClient: returns the underlying ApolloClient.

Released under the MIT License.