diff --git a/dist/vue-apollo.esm.js b/dist/vue-apollo.esm.js index 4b655d3..59a7637 100644 --- a/dist/vue-apollo.esm.js +++ b/dist/vue-apollo.esm.js @@ -2073,7 +2073,7 @@ function install(Vue, options) { } ApolloProvider.install = install; // eslint-disable-next-line no-undef -ApolloProvider.version = "3.0.0-rc.5"; // Apollo provider +ApolloProvider.version = "3.0.0-rc.6"; // Apollo provider var ApolloProvider$1 = ApolloProvider; // Components diff --git a/dist/vue-apollo.min.js b/dist/vue-apollo.min.js index 9935895..b27e67c 100644 --- a/dist/vue-apollo.min.js +++ b/dist/vue-apollo.min.js @@ -1 +1 @@ -var VueApollo=function(t,o){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var i=0;i.provide() is deprecated. Use the 'apolloProvider' option instead with the provider object directly."),a({},e,this)}}]),e}();var E={name:"ApolloQuery",provide:function(){return{getDollarApollo:this.getDollarApollo,getApolloQuery:this.getApolloQuery}},props:{query:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},fetchPolicy:{type:String,default:void 0},pollInterval:{type:Number,default:void 0},notifyOnNetworkStatusChange:{type:Boolean,default:void 0},context:{type:Object,default:void 0},update:{type:Function,default:function(t){return t}},skip:{type:Boolean,default:!1},debounce:{type:Number,default:0},throttle:{type:Number,default:0},clientId:{type:String,default:void 0},deep:{type:Boolean,default:void 0},tag:{type:String,default:"div"},prefetch:{type:Boolean,default:!0},options:{type:Object,default:function(){return{}}}},data:function(){return{result:{data:null,loading:!1,networkStatus:7,error:null},times:0}},watch:{fetchPolicy:function(t){this.$apollo.queries.query.setOptions({fetchPolicy:t})},pollInterval:function(t){this.$apollo.queries.query.setOptions({pollInterval:t})},notifyOnNetworkStatusChange:function(t){this.$apollo.queries.query.setOptions({notifyOnNetworkStatusChange:t})},"$data.$apolloData.loading":function(t){this.$emit("loading",!!t)}},apollo:{$client:function(){return this.clientId},query:function(){return c({query:function(){return"function"==typeof this.query?this.query(o):this.query},variables:function(){return this.variables},fetchPolicy:this.fetchPolicy,pollInterval:this.pollInterval,debounce:this.debounce,throttle:this.throttle,notifyOnNetworkStatusChange:this.notifyOnNetworkStatusChange,context:function(){return this.context},skip:function(){return this.skip},deep:this.deep,prefetch:this.prefetch},this.options,{manual:!0,result:function(t){var e=t,i=e.errors,o=e.loading,r=e.networkStatus,n=t.error;t=Object.assign({},t),i&&i.length&&((n=new Error("Apollo errors occurred (".concat(i.length,")"))).graphQLErrors=i);var s={};o?Object.assign(s,this.$_previousData,t.data):n?Object.assign(s,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(s=t.data,this.$_previousData=t.data);var a=function(t){return 0 `subscribe` option is deprecated. Use the `$subscribe` option instead."),i.$subscribe)for(var s in i.$subscribe)this.$apollo.addSmartSubscription(s,i.$subscribe[s])}}}function K(t,e,i,o){void 0!==i&&("function"==typeof i?t.defineReactiveSetter(e,i,o):t[e]=i)}function N(){this.$_apollo&&(this.$_apollo.destroy(),this.$_apollo=null)}function V(t,e){t.mixin(c({},"1"===e?{init:M}:{},{},"2"===e?{data:function(){return{$apolloData:{queries:{},loading:0,data:this.$_apolloInitData}}},beforeCreate:function(){M.call(this),function(){var i=this;this.$_apolloInitData={};var t=this.$options.apollo;if(t){var e=function(e){"$"!==e.charAt(0)&&(t[e].manual||I(i.$options.props,e)||I(i.$options.computed,e)||I(i.$options.methods,e)||Object.defineProperty(i,e,{get:function(){return i.$data.$apolloData.data[e]},set:function(t){return i.$_apolloInitData[e]=t},enumerable:!0,configurable:!0}))};for(var o in t)e(o)}}.call(this)},serverPrefetch:function(){if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises)}}:{},{created:T,destroyed:N}))}var F=["$subscribe"];function H(t,e){if(!H.installed){H.installed=!0;var i=(k.Vue=t).version.substr(0,t.version.indexOf(".")),l=t.config.optionMergeStrategies.methods;t.config.optionMergeStrategies.apollo=function(t,e,i){if(!t)return e;if(!e)return t;for(var o=Object.assign({},_(t,F),t.data),r=Object.assign({},_(e,F),e.data),n={},s=0;s.provide() is deprecated. Use the 'apolloProvider' option instead with the provider object directly."),a({},e,this)}}]),e}();var E={name:"ApolloQuery",provide:function(){return{getDollarApollo:this.getDollarApollo,getApolloQuery:this.getApolloQuery}},props:{query:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},fetchPolicy:{type:String,default:void 0},pollInterval:{type:Number,default:void 0},notifyOnNetworkStatusChange:{type:Boolean,default:void 0},context:{type:Object,default:void 0},update:{type:Function,default:function(t){return t}},skip:{type:Boolean,default:!1},debounce:{type:Number,default:0},throttle:{type:Number,default:0},clientId:{type:String,default:void 0},deep:{type:Boolean,default:void 0},tag:{type:String,default:"div"},prefetch:{type:Boolean,default:!0},options:{type:Object,default:function(){return{}}}},data:function(){return{result:{data:null,loading:!1,networkStatus:7,error:null},times:0}},watch:{fetchPolicy:function(t){this.$apollo.queries.query.setOptions({fetchPolicy:t})},pollInterval:function(t){this.$apollo.queries.query.setOptions({pollInterval:t})},notifyOnNetworkStatusChange:function(t){this.$apollo.queries.query.setOptions({notifyOnNetworkStatusChange:t})},"$data.$apolloData.loading":function(t){this.$emit("loading",!!t)}},apollo:{$client:function(){return this.clientId},query:function(){return c({query:function(){return"function"==typeof this.query?this.query(o):this.query},variables:function(){return this.variables},fetchPolicy:this.fetchPolicy,pollInterval:this.pollInterval,debounce:this.debounce,throttle:this.throttle,notifyOnNetworkStatusChange:this.notifyOnNetworkStatusChange,context:function(){return this.context},skip:function(){return this.skip},deep:this.deep,prefetch:this.prefetch},this.options,{manual:!0,result:function(t){var e=t,i=e.errors,o=e.loading,r=e.networkStatus,n=t.error;t=Object.assign({},t),i&&i.length&&((n=new Error("Apollo errors occurred (".concat(i.length,")"))).graphQLErrors=i);var s={};o?Object.assign(s,this.$_previousData,t.data):n?Object.assign(s,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(s=t.data,this.$_previousData=t.data);var a=function(t){return 0 `subscribe` option is deprecated. Use the `$subscribe` option instead."),i.$subscribe)for(var s in i.$subscribe)this.$apollo.addSmartSubscription(s,i.$subscribe[s])}}}function K(t,e,i,o){void 0!==i&&("function"==typeof i?t.defineReactiveSetter(e,i,o):t[e]=i)}function N(){this.$_apollo&&(this.$_apollo.destroy(),this.$_apollo=null)}function V(t,e){t.mixin(c({},"1"===e?{init:M}:{},{},"2"===e?{data:function(){return{$apolloData:{queries:{},loading:0,data:this.$_apolloInitData}}},beforeCreate:function(){M.call(this),function(){var i=this;this.$_apolloInitData={};var t=this.$options.apollo;if(t){var e=function(e){"$"!==e.charAt(0)&&(t[e].manual||I(i.$options.props,e)||I(i.$options.computed,e)||I(i.$options.methods,e)||Object.defineProperty(i,e,{get:function(){return i.$data.$apolloData.data[e]},set:function(t){return i.$_apolloInitData[e]=t},enumerable:!0,configurable:!0}))};for(var o in t)e(o)}}.call(this)},serverPrefetch:function(){if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises)}}:{},{created:T,destroyed:N}))}var F=["$subscribe"];function H(t,e){if(!H.installed){H.installed=!0;var i=(k.Vue=t).version.substr(0,t.version.indexOf(".")),l=t.config.optionMergeStrategies.methods;t.config.optionMergeStrategies.apollo=function(t,e,i){if(!t)return e;if(!e)return t;for(var o=Object.assign({},_(t,F),t.data),r=Object.assign({},_(e,F),e.data),n={},s=0;s