Bot releases are visible (Hide)
ApolloProvider
now uses the inject
/provide
feature of Vue to inject itself into any child component in the app. Migration path: replace apolloProvider,
with provide: apolloProvider.provide(),
on you main Vue instance (doc).willPrefetch
now accepts a 2nd argument, which is a callback getting the context as argument and that should return a boolean indicating if the component will be prefetched or not (doc).willPrefetch
is now exposed on window
or global
as vueApolloWillPrefetch
. This can be useful when authoring 3rd-party libraries using vue-apollo.$loadingKey
: default value for the component$error
: extra error handler for the component$watchLoading
: extra loading watcherdefaultOptions
: default object for all the apollo
definitionswatchLoading
: global loading watchererrorHandler
: global error handlervariables
is now undefined
if prefetch
is true
and no variables
option is present on the smart querygetStates
method (doc).subscribeToMore
directly inside query definition (doc).refetch
, fetchMore
, setVariables
and setOptions
now trigger loading state changes.result
hook parameter is now a full ApolloQueryResult object.apolloProvider.collect
new waitForLoaded
option (doc). This allow waiting for all queries to be loaded, even when they return partial results (for example, from cache).vue-router
or vuex
), instead of passing the apollo client into the plugin directly. More info in the docs. This breaking change was necessary for the two main new features below.
refetch
, setVariables
, setOptions
, startPolling
and stopPolling
on smart queries[email protected]
graphql-tag
to 2.0.0