Socket
Socket
Sign inDemoInstall

@department/apollo-component

Package Overview
Dependencies
6
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.5.0 to 1.6.0

22

dist/index.cjs.js

@@ -11,2 +11,4 @@ 'use strict';

var isPlainObject = function (obj) { return typeof obj === "object" && obj.constructor === Object; };
/**

@@ -122,4 +124,3 @@ * Example:

// ex. <button onClick={refetch} />
var isPlainObj = typeof vars == "object" && vars.constructor == Object;
return this.observable.refetch(isPlainObj ? vars : undefined);
return this.observable.refetch(isPlainObject(vars) ? vars : undefined);
}

@@ -290,2 +291,11 @@ };

// special case for when vars are event
// ex. <button onClick={mutate} />
if (!isPlainObject(variables)) {
variables = undefined;
}
// default to variables prop
if (typeof variables == "undefined") {
variables = this.props.variables;
}
var ref = this.context.apollo;

@@ -327,4 +337,4 @@ var client = ref.client;

// <Mutate fail> will throw the error instead of using the callback
if (this.props.fail && state.error) {
throw state.error;
if (this.props.fail && this.state.error) {
throw this.state.error;
}

@@ -348,2 +358,6 @@

// Default variables passed into the Mutation
// (when no variables are passed into the mutation callback)
variables: PropTypes.object,
// Fail by throwing an exception and letting the React error boundary

@@ -350,0 +364,0 @@ // take care of it instead of passing the error into the render callback

7

package.json
{
"name": "@department/apollo-component",
"version": "1.5.0",
"version": "1.6.0",
"description": "Render component for your Apollo Client",

@@ -16,4 +16,3 @@ "repository": "department-stockholm/apollo-component",

"prepare": "rollup -c",
"release": "release",
"postpublish": "release"
"release": "release"
},

@@ -31,3 +30,3 @@ "author": "Robert Sköld (https://department.se)",

"react": "^16.1.0",
"release": "^2.5.6",
"release": "^3.0.1",
"rollup": "^0.51.5",

@@ -34,0 +33,0 @@ "rollup-plugin-buble": "^0.18.0"

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc