Skip to content

Commit 15bb0f7

Browse files
author
Guillaume Chau
committed
chore: v3.0.0-beta.25
1 parent 0345373 commit 15bb0f7

File tree

4 files changed

+24
-36
lines changed

4 files changed

+24
-36
lines changed

dist/vue-apollo.esm.js

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,12 +1720,10 @@ function initDollarApollo() {
17201720
function proxyData() {
17211721
var _this = this;
17221722

1723-
var apollo = this.$options.apollo;
1723+
this.$_apolloInitData = {};
17241724

1725+
var apollo = this.$options.apollo;
17251726
if (apollo) {
1726-
this.$_apolloInitData = {};
1727-
// watchQuery
1728-
17291727
var _loop = function _loop(key) {
17301728
if (key.charAt(0) !== '$') {
17311729
var options = apollo[key];
@@ -1746,6 +1744,7 @@ function proxyData() {
17461744
}
17471745
};
17481746

1747+
// watchQuery
17491748
for (var key in apollo) {
17501749
_loop(key);
17511750
}
@@ -1790,16 +1789,11 @@ function launch() {
17901789
configurable: true
17911790
});
17921791

1793-
// Init data
1794-
for (var key in this.$_apolloInitData) {
1795-
this.$set(this.$data.$apolloData.data, key, this.$_apolloInitData[key]);
1796-
}
1797-
17981792
// watchQuery
1799-
for (var _key in apollo) {
1800-
if (_key.charAt(0) !== '$') {
1801-
var options = apollo[_key];
1802-
this.$apollo.addSmartQuery(_key, options);
1793+
for (var key in apollo) {
1794+
if (key.charAt(0) !== '$') {
1795+
var options = apollo[key];
1796+
this.$apollo.addSmartQuery(key, options);
18031797
}
18041798
}
18051799

@@ -1808,8 +1802,8 @@ function launch() {
18081802
}
18091803

18101804
if (apollo.$subscribe) {
1811-
for (var _key2 in apollo.$subscribe) {
1812-
this.$apollo.addSmartSubscription(_key2, apollo.$subscribe[_key2]);
1805+
for (var _key in apollo.$subscribe) {
1806+
this.$apollo.addSmartSubscription(_key, apollo.$subscribe[_key]);
18131807
}
18141808
}
18151809
}
@@ -1834,7 +1828,7 @@ function installMixin(Vue, vueVersion) {
18341828
'$apolloData': {
18351829
queries: {},
18361830
loading: 0,
1837-
data: {}
1831+
data: this.$_apolloInitData
18381832
}
18391833
};
18401834
},
@@ -1907,7 +1901,7 @@ function install(Vue, options) {
19071901
ApolloProvider.install = install;
19081902

19091903
// eslint-disable-next-line no-undef
1910-
ApolloProvider.version = "3.0.0-beta.24";
1904+
ApolloProvider.version = "3.0.0-beta.25";
19111905

19121906
// Apollo provider
19131907
var ApolloProvider$1 = ApolloProvider;

0 commit comments

Comments
 (0)