Skip to content

Commit 5383b4e

Browse files
author
Guillaume Chau
committed
Version bump
1 parent fa450d0 commit 5383b4e

File tree

4 files changed

+55
-33
lines changed

4 files changed

+55
-33
lines changed

dist/vue-apollo.esm.js

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,7 +1487,7 @@ function stubArray() {
14871487
return [];
14881488
}
14891489

1490-
var index = omit;
1490+
var lodash_omit = omit;
14911491

14921492
/**
14931493
* lodash (Custom Build) <https://lodash.com/>
@@ -1927,7 +1927,7 @@ function toNumber(value) {
19271927
: (reIsBadHex.test(value) ? NAN : +value);
19281928
}
19291929

1930-
var index$1 = throttle$1;
1930+
var lodash_throttle = throttle$1;
19311931

19321932
/**
19331933
* lodash (Custom Build) <https://lodash.com/>
@@ -2305,7 +2305,7 @@ function toNumber$1(value) {
23052305
: (reIsBadHex$1.test(value) ? NAN$1 : +value);
23062306
}
23072307

2308-
var index$2 = debounce$2;
2308+
var lodash_debounce = debounce$2;
23092309

23102310
var Globals = {};
23112311

@@ -2319,9 +2319,9 @@ function factory(action) {
23192319
};
23202320
}
23212321

2322-
var throttle = factory(index$1);
2322+
var throttle = factory(lodash_throttle);
23232323

2324-
var debounce = factory(index$2);
2324+
var debounce = factory(lodash_debounce);
23252325

23262326
function getMergedDefinition(def) {
23272327
return Globals.Vue.util.mergeOptions({}, def);
@@ -2598,7 +2598,7 @@ var SmartApollo = function () {
25982598
}, {
25992599
key: 'generateApolloOptions',
26002600
value: function generateApolloOptions(variables) {
2601-
var apolloOptions = index(this.options, this.vueApolloSpecialKeys);
2601+
var apolloOptions = lodash_omit(this.options, this.vueApolloSpecialKeys);
26022602
apolloOptions.variables = variables;
26032603
return apolloOptions;
26042604
}
@@ -3037,15 +3037,26 @@ var DollarApollo = function () {
30373037
}, {
30383038
key: 'addSmartQuery',
30393039
value: function addSmartQuery(key, options) {
3040+
var _this3 = this;
3041+
30403042
options = reapply(options, this.vm);
30413043

30423044
var smart = this.queries[key] = new SmartQuery(this.vm, key, options, false);
30433045
smart.autostart();
30443046

3045-
if (options.subscribeToMore) {
3046-
this.addSmartSubscription(key, _extends({}, options.subscribeToMore, {
3047-
linkedQuery: smart
3048-
}));
3047+
var subs = options.subscribeToMore;
3048+
if (subs) {
3049+
if (Array.isArray(subs)) {
3050+
subs.forEach(function (sub, index) {
3051+
_this3.addSmartSubscription('' + key + index, _extends({}, sub, {
3052+
linkedQuery: smart
3053+
}));
3054+
});
3055+
} else {
3056+
this.addSmartSubscription(key, _extends({}, subs, {
3057+
linkedQuery: smart
3058+
}));
3059+
}
30493060
}
30503061

30513062
return smart;
@@ -3063,10 +3074,10 @@ var DollarApollo = function () {
30633074
}, {
30643075
key: 'defineReactiveSetter',
30653076
value: function defineReactiveSetter(key, func) {
3066-
var _this3 = this;
3077+
var _this4 = this;
30673078

30683079
this._watchers.push(this.vm.$watch(func, function (value) {
3069-
_this3[key] = value;
3080+
_this4[key] = value;
30703081
}, {
30713082
immediate: true
30723083
}));
@@ -3286,7 +3297,7 @@ var ApolloProvider$1 = function () {
32863297

32873298
// Query
32883299
return new Promise(function (resolve, reject) {
3289-
var options = index(queryOptions, VUE_APOLLO_QUERY_KEYWORDS);
3300+
var options = lodash_omit(queryOptions, VUE_APOLLO_QUERY_KEYWORDS);
32903301
options.variables = variables;
32913302
client.query(options).then(resolve, reject);
32923303
});
@@ -3407,8 +3418,8 @@ function install(Vue, options) {
34073418
if (!toVal) return fromVal;
34083419
if (!fromVal) return toVal;
34093420

3410-
var toData = Object.assign({}, index(toVal, keywords), toVal.data);
3411-
var fromData = Object.assign({}, index(fromVal, keywords), fromVal.data);
3421+
var toData = Object.assign({}, lodash_omit(toVal, keywords), toVal.data);
3422+
var fromData = Object.assign({}, lodash_omit(fromVal, keywords), fromVal.data);
34123423

34133424
var map = {};
34143425
for (var i = 0; i < keywords.length; i++) {

0 commit comments

Comments
 (0)