New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vue/apollo-components

Package Overview
Dependencies
Maintainers
1
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.20 to 4.0.0-beta.2

2

dist/vue-apollo-components.esm.js

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

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

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

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

var VueApolloComponents=function(t,r,e){"use strict";function o(e,t){var o,r=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)),r}function n(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){var e,o;e=r,o=n[t=t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var i={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(n({query:function(){return"function"==typeof this.query?this.query(r):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,o=e.errors,r=e.loading,e=e.networkStatus,n=t.error,o=(t=Object.assign({},t),o&&o.length&&((n=new Error("Apollo errors occurred (".concat(o.length,")"))).graphQLErrors=o),{}),t=(r?Object.assign(o,this.$_previousData,t.data):n?Object.assign(o,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(o=t.data,this.$_previousData=t.data),(t=o)&&0<Object.keys(t).length);this.result={data:t?this.update(o):void 0,fullData:t?o:void 0,loading:r,error:n,networkStatus:e},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(){var t=this.$slots.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 this.tag?e.h(this.tag,t):t}},u=0,l={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(u++)},mounted:function(){this.refresh()},beforeUnmount:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var t=this.document;"function"==typeof t&&(t=t(r)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:t,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(){return null}};function a(u,l,a,s){var c,p=!1,d=0;function h(){c&&clearTimeout(c)}function t(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var r=this,n=Date.now()-d;function i(){d=Date.now(),a.apply(r,e)}p||(s&&!c&&i(),h(),void 0===s&&u<n?i():!0!==l&&(c=setTimeout(s?function(){c=void 0}:i,void 0===s?u-n:u)))}return"boolean"!=typeof l&&(s=a,a=l,l=void 0),t.cancel=function(){h(),p=!0},t}var s=Object.freeze({__proto__:null,debounce:function(t,e,o){return void 0===o?a(t,e,!1):a(t,o,!1!==e)},throttle:a});function c(o){return function(t,e){return o(e,t)}}c(s.throttle),c(s.debounce);var p={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"},context:{type:Object,default:void 0}},data:function(){return{loading:!1,error:null}},watch:{loading:function(t){this.$emit("loading",t)}},methods:{mutate:function(t){var o=this,e=(this.loading=!0,this.error=null,this.mutation);return"function"==typeof e&&(e=e(r)),this.$apollo.mutate(n({mutation:e,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries,context:this.context},t)).then(function(t){o.$emit("done",t),o.loading=!1}).catch(function(t){var e;(e=t).graphQLErrors&&e.graphQLErrors.length&&(e.gqlError=e.graphQLErrors[0]),o.error=t,o.$emit("error",t),o.loading=!1})}},render:function(){var t=this.$slots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError});return this.tag?e.h(this.tag,t):t}},s={};function d(t,e){t.component("ApolloQuery",i),t.component("ApolloSubscribeToMore",l),t.component("ApolloMutation",p)}s.install=d,s.version="4.0.0-alpha.20";var h=s,f=i,y=l,g=p,b=null;return"undefined"!=typeof window?b=window.Vue:"undefined"!=typeof global&&(b=global.Vue),b&&b.use(s),t.ApolloMutation=g,t.ApolloProvider=h,t.ApolloQuery=f,t.ApolloSubscribeToMore=y,t.default=s,t.install=d,t}({},gql,vue);
var VueApolloComponents=function(t,r,e){"use strict";function o(e,t){var o,r=Object.keys(e);return Object.getOwnPropertySymbols&&(o=Object.getOwnPropertySymbols(e),t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)),r}function n(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach(function(t){var e,o;e=r,o=n[t=t],t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(t){Object.defineProperty(r,t,Object.getOwnPropertyDescriptor(n,t))})}return r}r=r&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r;var i={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(n({query:function(){return"function"==typeof this.query?this.query(r):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,o=e.errors,r=e.loading,e=e.networkStatus,n=t.error,o=(t=Object.assign({},t),o&&o.length&&((n=new Error("Apollo errors occurred (".concat(o.length,")"))).graphQLErrors=o),{}),t=(r?Object.assign(o,this.$_previousData,t.data):n?Object.assign(o,this.$apollo.queries.query.observer.getLastResult()||{},t.data):(o=t.data,this.$_previousData=t.data),(t=o)&&0<Object.keys(t).length);this.result={data:t?this.update(o):void 0,fullData:t?o:void 0,loading:r,error:n,networkStatus:e},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(){var t=this.$slots.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 this.tag?e.h(this.tag,t):t}},u=0,l={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(u++)},mounted:function(){this.refresh()},beforeUnmount:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var t=this.document;"function"==typeof t&&(t=t(r)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:t,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(){return null}};function a(u,l,a,s){var c,p=!1,d=0;function h(){c&&clearTimeout(c)}function t(){for(var t=arguments.length,e=new Array(t),o=0;o<t;o++)e[o]=arguments[o];var r=this,n=Date.now()-d;function i(){d=Date.now(),a.apply(r,e)}p||(s&&!c&&i(),h(),void 0===s&&u<n?i():!0!==l&&(c=setTimeout(s?function(){c=void 0}:i,void 0===s?u-n:u)))}return"boolean"!=typeof l&&(s=a,a=l,l=void 0),t.cancel=function(){h(),p=!0},t}var s=Object.freeze({__proto__:null,debounce:function(t,e,o){return void 0===o?a(t,e,!1):a(t,o,!1!==e)},throttle:a});function c(o){return function(t,e){return o(e,t)}}c(s.throttle),c(s.debounce);var p={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"},context:{type:Object,default:void 0}},data:function(){return{loading:!1,error:null}},watch:{loading:function(t){this.$emit("loading",t)}},methods:{mutate:function(t){var o=this,e=(this.loading=!0,this.error=null,this.mutation);return"function"==typeof e&&(e=e(r)),this.$apollo.mutate(n({mutation:e,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries,context:this.context},t)).then(function(t){o.$emit("done",t),o.loading=!1}).catch(function(t){var e;(e=t).graphQLErrors&&e.graphQLErrors.length&&(e.gqlError=e.graphQLErrors[0]),o.error=t,o.$emit("error",t),o.loading=!1})}},render:function(){var t=this.$slots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError});return this.tag?e.h(this.tag,t):t}},s={};function d(t,e){t.component("ApolloQuery",i),t.component("ApolloSubscribeToMore",l),t.component("ApolloMutation",p)}s.install=d,s.version="4.0.0-beta.2";var h=s,f=i,y=l,g=p,b=null;return"undefined"!=typeof window?b=window.Vue:"undefined"!=typeof global&&(b=global.Vue),b&&b.use(s),t.ApolloMutation=g,t.ApolloProvider=h,t.ApolloQuery=f,t.ApolloSubscribeToMore=y,t.default=s,t.install=d,t}({},gql,vue);

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

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

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

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

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

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

@@ -32,0 +32,0 @@ "peerDependencies": {

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