Socket
Socket
Sign inDemoInstall

shopify-api-node

Package Overview
Dependencies
Maintainers
2
Versions
108
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shopify-api-node - npm Package Compare versions

Comparing version 3.7.3 to 3.8.0

29

index.js

@@ -62,3 +62,5 @@ 'use strict';

current: undefined,
max: undefined
max: undefined,
actualQueryCost: undefined,
requestedQueryCost: undefined
};

@@ -196,15 +198,22 @@

*
* @param {String} throttle The status returned in the GraphQL response
* @param {Object} cost The `extensions.cost` object returned in the GraphQL
* response
* @private
*/
Shopify.prototype.updateGraphqlLimits = function updateGraphqlLimits(throttle) {
if (!throttle) return;
Shopify.prototype.updateGraphqlLimits = function updateGraphqlLimits({
throttleStatus,
actualQueryCost,
requestedQueryCost
}) {
if (!throttleStatus) return;
const limits = this.callGraphqlLimits;
limits.current =
throttleStatus.maximumAvailable - throttleStatus.currentlyAvailable;
limits.remaining = throttleStatus.currentlyAvailable;
limits.restoreRate = throttleStatus.restoreRate;
limits.max = throttleStatus.maximumAvailable;
limits.requestedQueryCost = requestedQueryCost;
limits.actualQueryCost = actualQueryCost;
limits.current = throttle.maximumAvailable - throttle.currentlyAvailable;
limits.remaining = throttle.currentlyAvailable;
limits.restoreRate = throttle.restoreRate;
limits.max = throttle.maximumAvailable;
this.emit('callGraphqlLimits', limits);

@@ -246,3 +255,3 @@ };

if (res.body.extensions && res.body.extensions.cost) {
this.updateGraphqlLimits(res.body.extensions.cost.throttleStatus);
this.updateGraphqlLimits(res.body.extensions.cost);
}

@@ -249,0 +258,0 @@

{
"name": "shopify-api-node",
"version": "3.7.3",
"version": "3.8.0",
"description": "Shopify API bindings for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

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