Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@vue/apollo-components

Package Overview
Dependencies
Maintainers
13
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vue/apollo-components - npm Package Compare versions

Comparing version 4.0.0-alpha.2 to 4.0.0-alpha.6

2

dist/vue-apollo-components.esm.js

@@ -675,3 +675,3 @@ import gql from 'graphql-tag';

plugin.version = "4.0.0-alpha.2"; // Apollo provider
plugin.version = "4.0.0-alpha.6"; // Apollo provider

@@ -678,0 +678,0 @@ var ApolloProvider = plugin; // Components

@@ -1,1 +0,1 @@

var VueApolloComponents=function(t,o){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function n(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,r,o;e=n,o=i[r=t],r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var r=[],o=!0,n=!1,i=void 0;try{for(var l,u=t[Symbol.iterator]();!(o=(l=u.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(t){n=!0,i=t}finally{try{o||null==u.return||u.return()}finally{if(n)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}o=o&&o.hasOwnProperty("default")?o.default:o;var r={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 n({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.errors,r=t.loading,o=t.networkStatus,n=t.error;t=Object.assign({},t),e&&e.length&&((n=new Error("Apollo errors occurred (".concat(e.length,")"))).graphQLErrors=e);var i={};r?Object.assign(i,this.$_previousData,t.data):n?Object.assign(i,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(i=t.data,this.$_previousData=t.data);var l,u=(l=i,0<Object.keys(l).length);this.result={data:u?this.update(i):void 0,fullData:u?i:void 0,loading:r,error:n,networkStatus:o},this.times=++this.$_times,this.$emit("result",this.result)},error:function(t){this.result.loading=!1,this.result.error=t,this.$emit("error",t)}})}},created:function(){this.$_times=0},methods:{getDollarApollo:function(){return this.$apollo},getApolloQuery:function(){return this.$apollo.queries.query}},render:function(t){var e=this.$scopedSlots.default({result:this.result,times:this.times,query:this.$apollo.queries.query,isLoading:this.$apolloData.loading,gqlError:this.result&&this.result.error&&this.result.error.gqlError});return e=Array.isArray(e)?e.concat(this.$slots.default):[e].concat(this.$slots.default),this.tag?t(this.tag,e):e[0]}},l=0,u={name:"ApolloSubscribeToMore",inject:["getDollarApollo","getApolloQuery"],props:{document:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},updateQuery:{type:Function,default:void 0}},watch:{document:"refresh",variables:"refresh"},created:function(){this.$_key="sub_component_".concat(l++)},mounted:function(){this.refresh()},beforeDestroy:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var t=this.document;"function"==typeof t&&(t=t(o)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:t,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(){return null}};function a(n,i,l,u){var a,s=!1,c=0;function p(){a&&clearTimeout(a)}function t(){var t=this,e=Date.now()-c,r=arguments;function o(){c=Date.now(),l.apply(t,r)}s||(u&&!a&&o(),p(),void 0===u&&n<e?o():!0!==i&&(a=setTimeout(u?function(){a=void 0}:o,void 0===u?n-e:n)))}return"boolean"!=typeof i&&(u=l,l=i,i=void 0),t.cancel=function(){p(),s=!0},t}var s,c=Object.freeze({__proto__:null,throttle:a,debounce:function(t,e,r){return void 0===r?a(t,e,!1):a(t,r,!1!==e)}}),p=(function(t,e){var r=e.Globals={};function o(r){return function(t,e){return r(e,t)}}e.throttle=o(c.throttle),e.debounce=o(c.debounce),e.getMergedDefinition=function(t){return r.Vue.util.mergeOptions({},t)},e.reapply=function(t,e){for(;"function"==typeof t;)t=t.call(e);return t},e.omit=function(t,r){return Object.entries(t).filter(function(t){var e=i(t,1)[0];return!r.includes(e)}).reduce(function(t,e){var r=i(e,2),o=r[0],n=r[1];return t[o]=n,t},{})},e.addGqlError=function(t){t.graphQLErrors&&t.graphQLErrors.length&&(t.gqlError=t.graphQLErrors[0])},e.noop=function(){}}(s={exports:{}},s.exports),s.exports),d=(p.Globals,p.throttle,p.debounce,p.getMergedDefinition,p.reapply,p.omit,p.addGqlError),f=(p.noop,{props:{mutation:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},optimisticResponse:{type:Object,default:void 0},update:{type:Function,default:void 0},refetchQueries:{type:Function,default:void 0},clientId:{type:String,default:void 0},tag:{type:String,default:"div"}},data:function(){return{loading:!1,error:null}},watch:{loading:function(t){this.$emit("loading",t)}},methods:{mutate:function(t){var e=this;this.loading=!0,this.error=null;var r=this.mutation;"function"==typeof r&&(r=r(o)),this.$apollo.mutate(n({mutation:r,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries},t)).then(function(t){e.$emit("done",t),e.loading=!1}).catch(function(t){d(t),e.error=t,e.$emit("error",t),e.loading=!1})}},render:function(t){var e=this.$scopedSlots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError});return e=Array.isArray(e)?e.concat(this.$slots.default):[e].concat(this.$slots.default),this.tag?t(this.tag,e):e[0]}}),h={};function y(t,e){y.installed||(y.installed=!0,t.component("apollo-query",r),t.component("ApolloQuery",r),t.component("apollo-subscribe-to-more",u),t.component("ApolloSubscribeToMore",u),t.component("apollo-mutation",f),t.component("ApolloMutation",f))}h.install=y,h.version="4.0.0-alpha.2";var b=h,g=r,v=u,m=f,O=null;return"undefined"!=typeof window?O=window.Vue:"undefined"!=typeof global&&(O=global.Vue),O&&O.use(h),t.ApolloMutation=m,t.ApolloProvider=b,t.ApolloQuery=g,t.ApolloSubscribeToMore=v,t.default=h,t.install=y,t}({},gql);
var VueApolloComponents=function(t,o){"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function n(n){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?e(Object(i),!0).forEach(function(t){var e,r,o;e=n,o=i[r=t],r in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):e(Object(i)).forEach(function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(i,t))})}return n}function i(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(!(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)))return;var r=[],o=!0,n=!1,i=void 0;try{for(var l,u=t[Symbol.iterator]();!(o=(l=u.next()).done)&&(r.push(l.value),!e||r.length!==e);o=!0);}catch(t){n=!0,i=t}finally{try{o||null==u.return||u.return()}finally{if(n)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}o=o&&o.hasOwnProperty("default")?o.default:o;var r={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 n({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.errors,r=t.loading,o=t.networkStatus,n=t.error;t=Object.assign({},t),e&&e.length&&((n=new Error("Apollo errors occurred (".concat(e.length,")"))).graphQLErrors=e);var i={};r?Object.assign(i,this.$_previousData,t.data):n?Object.assign(i,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(i=t.data,this.$_previousData=t.data);var l,u=(l=i,0<Object.keys(l).length);this.result={data:u?this.update(i):void 0,fullData:u?i:void 0,loading:r,error:n,networkStatus:o},this.times=++this.$_times,this.$emit("result",this.result)},error:function(t){this.result.loading=!1,this.result.error=t,this.$emit("error",t)}})}},created:function(){this.$_times=0},methods:{getDollarApollo:function(){return this.$apollo},getApolloQuery:function(){return this.$apollo.queries.query}},render:function(t){var e=this.$scopedSlots.default({result:this.result,times:this.times,query:this.$apollo.queries.query,isLoading:this.$apolloData.loading,gqlError:this.result&&this.result.error&&this.result.error.gqlError});return e=Array.isArray(e)?e.concat(this.$slots.default):[e].concat(this.$slots.default),this.tag?t(this.tag,e):e[0]}},l=0,u={name:"ApolloSubscribeToMore",inject:["getDollarApollo","getApolloQuery"],props:{document:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},updateQuery:{type:Function,default:void 0}},watch:{document:"refresh",variables:"refresh"},created:function(){this.$_key="sub_component_".concat(l++)},mounted:function(){this.refresh()},beforeDestroy:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var t=this.document;"function"==typeof t&&(t=t(o)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:t,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(){return null}};function a(n,i,l,u){var a,s=!1,c=0;function p(){a&&clearTimeout(a)}function t(){var t=this,e=Date.now()-c,r=arguments;function o(){c=Date.now(),l.apply(t,r)}s||(u&&!a&&o(),p(),void 0===u&&n<e?o():!0!==i&&(a=setTimeout(u?function(){a=void 0}:o,void 0===u?n-e:n)))}return"boolean"!=typeof i&&(u=l,l=i,i=void 0),t.cancel=function(){p(),s=!0},t}var s,c=Object.freeze({__proto__:null,throttle:a,debounce:function(t,e,r){return void 0===r?a(t,e,!1):a(t,r,!1!==e)}}),p=(function(t,e){var r=e.Globals={};function o(r){return function(t,e){return r(e,t)}}e.throttle=o(c.throttle),e.debounce=o(c.debounce),e.getMergedDefinition=function(t){return r.Vue.util.mergeOptions({},t)},e.reapply=function(t,e){for(;"function"==typeof t;)t=t.call(e);return t},e.omit=function(t,r){return Object.entries(t).filter(function(t){var e=i(t,1)[0];return!r.includes(e)}).reduce(function(t,e){var r=i(e,2),o=r[0],n=r[1];return t[o]=n,t},{})},e.addGqlError=function(t){t.graphQLErrors&&t.graphQLErrors.length&&(t.gqlError=t.graphQLErrors[0])},e.noop=function(){}}(s={exports:{}},s.exports),s.exports),d=(p.Globals,p.throttle,p.debounce,p.getMergedDefinition,p.reapply,p.omit,p.addGqlError),f=(p.noop,{props:{mutation:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},optimisticResponse:{type:Object,default:void 0},update:{type:Function,default:void 0},refetchQueries:{type:Function,default:void 0},clientId:{type:String,default:void 0},tag:{type:String,default:"div"}},data:function(){return{loading:!1,error:null}},watch:{loading:function(t){this.$emit("loading",t)}},methods:{mutate:function(t){var e=this;this.loading=!0,this.error=null;var r=this.mutation;"function"==typeof r&&(r=r(o)),this.$apollo.mutate(n({mutation:r,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries},t)).then(function(t){e.$emit("done",t),e.loading=!1}).catch(function(t){d(t),e.error=t,e.$emit("error",t),e.loading=!1})}},render:function(t){var e=this.$scopedSlots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError});return e=Array.isArray(e)?e.concat(this.$slots.default):[e].concat(this.$slots.default),this.tag?t(this.tag,e):e[0]}}),h={};function y(t,e){y.installed||(y.installed=!0,t.component("apollo-query",r),t.component("ApolloQuery",r),t.component("apollo-subscribe-to-more",u),t.component("ApolloSubscribeToMore",u),t.component("apollo-mutation",f),t.component("ApolloMutation",f))}h.install=y,h.version="4.0.0-alpha.6";var b=h,g=r,v=u,m=f,O=null;return"undefined"!=typeof window?O=window.Vue:"undefined"!=typeof global&&(O=global.Vue),O&&O.use(h),t.ApolloMutation=m,t.ApolloProvider=b,t.ApolloQuery=g,t.ApolloSubscribeToMore=v,t.default=h,t.install=y,t}({},gql);

@@ -681,3 +681,3 @@ (function (global, factory) {

plugin.version = "4.0.0-alpha.2"; // Apollo provider
plugin.version = "4.0.0-alpha.6"; // Apollo provider

@@ -684,0 +684,0 @@ var ApolloProvider = plugin; // Components

{
"name": "@vue/apollo-components",
"version": "4.0.0-alpha.2",
"version": "4.0.0-alpha.6",
"description": "Apollo GraphQL components for Vue.js",

@@ -38,3 +38,3 @@ "main": "dist/vue-apollo-components.umd.js",

"dependencies": {
"@vue/apollo-option": "^4.0.0-alpha.2"
"@vue/apollo-option": "^4.0.0-alpha.6"
},

@@ -83,3 +83,3 @@ "devDependencies": {

},
"gitHead": "ff4c1630a61d639c6b4ff70097866b19a5be0e30"
"gitHead": "4624c3e71c5ef5e945f756e074dd3a2ae21f8f92"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc