1.0.7 • Published 7 months ago

shopify-graphql-bulk-throttler v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
7 months ago

Shopify GraphQL Bulk Throttler

Run bulk throttled requests through the Shopify GraphQL API.

Examples

import ShopifyGraphqlBulkThrottler from "shopify-graphql-bulk-throttler";

const throttler = new ShopifyGraphqlBulkThrottler(graphqlClient);

const myFunction = () => {
  throttler.setOnQueueEmpty(() => {
    console.log("All requests have been processed");

    throttler.stopRestore(); // stop restoring bucket points once we're finished
  });

  throttler.addToQueue({
    query: `query { shop { name } }`,
    variables: {},
  });

  // or

  throttler.addToQueue([
    {
      query: `query { shop { name } }`,
      variables: {},
    },
    {
      query: `query { shop { name } }`,
      variables: {},
    },
  ]);
};
1.0.7

7 months ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago