@@ -1723,6 +1723,9 @@ function proxyData() {
1723
1723
var apollo = this . $options . apollo ;
1724
1724
1725
1725
if ( apollo ) {
1726
+ this . $_apolloInitData = { } ;
1727
+ // watchQuery
1728
+
1726
1729
var _loop = function _loop ( key ) {
1727
1730
if ( key . charAt ( 0 ) !== '$' ) {
1728
1731
var options = apollo [ key ] ;
@@ -1732,14 +1735,17 @@ function proxyData() {
1732
1735
get : function get$$1 ( ) {
1733
1736
return _this . $data . $apolloData . data [ key ] ;
1734
1737
} ,
1738
+ // For component class constructor
1739
+ set : function set$$1 ( value ) {
1740
+ return _this . $_apolloInitData [ key ] = value ;
1741
+ } ,
1735
1742
enumerable : true ,
1736
1743
configurable : true
1737
1744
} ) ;
1738
1745
}
1739
1746
}
1740
1747
} ;
1741
1748
1742
- // watchQuery
1743
1749
for ( var key in apollo ) {
1744
1750
_loop ( key ) ;
1745
1751
}
@@ -1784,11 +1790,16 @@ function launch() {
1784
1790
configurable : true
1785
1791
} ) ;
1786
1792
1793
+ // Init data
1794
+ for ( var key in this . $_apolloInitData ) {
1795
+ this . $set ( this . $data . $apolloData . data , key , this . $_apolloInitData [ key ] ) ;
1796
+ }
1797
+
1787
1798
// watchQuery
1788
- for ( var key in apollo ) {
1789
- if ( key . charAt ( 0 ) !== '$' ) {
1790
- var options = apollo [ key ] ;
1791
- this . $apollo . addSmartQuery ( key , options ) ;
1799
+ for ( var _key in apollo ) {
1800
+ if ( _key . charAt ( 0 ) !== '$' ) {
1801
+ var options = apollo [ _key ] ;
1802
+ this . $apollo . addSmartQuery ( _key , options ) ;
1792
1803
}
1793
1804
}
1794
1805
@@ -1797,8 +1808,8 @@ function launch() {
1797
1808
}
1798
1809
1799
1810
if ( apollo . $subscribe ) {
1800
- for ( var _key in apollo . $subscribe ) {
1801
- this . $apollo . addSmartSubscription ( _key , apollo . $subscribe [ _key ] ) ;
1811
+ for ( var _key2 in apollo . $subscribe ) {
1812
+ this . $apollo . addSmartSubscription ( _key2 , apollo . $subscribe [ _key2 ] ) ;
1802
1813
}
1803
1814
}
1804
1815
}
@@ -1896,7 +1907,7 @@ function install(Vue, options) {
1896
1907
ApolloProvider . install = install ;
1897
1908
1898
1909
// eslint-disable-next-line no-undef
1899
- ApolloProvider . version = "3.0.0-beta.23 " ;
1910
+ ApolloProvider . version = "3.0.0-beta.24 " ;
1900
1911
1901
1912
// Apollo provider
1902
1913
var ApolloProvider$1 = ApolloProvider ;
0 commit comments