
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
apollo-link-shopify-retry
Advanced tools
Easy setup for retrying rate limited request in Shopify's (Admin) GraphQL API.
Easy setup for retrying rate limited request in Shopify's (Admin) GraphQL API.
For npm:
npm i apollo-link-shopify-retry
For yarn:
yarn add apollo-link-shopify-retry
When creating your client, inject this link
as a middleware:
// client.js
import {
ApolloClient,
HttpLink,
ApolloLink,
InMemoryCache,
} from "@apollo/client";
import { createShopifyRetryLink } from "apollo-link-shopify-retry";
export const createClient = (shop, accessToken) => {
const endpoint = new HttpLink({
uri: `https://${shop}/admin/api/2021-04/graphql.json`,
});
const rateLimit = createShopifyRetryLink();
const link = ApolloLink.from([
rateLimit,
endpoint,
]);
return new ApolloClient({
cache: new InMemoryCache(),
link,
});
};
By default, we log the throttles to console.log. You can disable this by passing { debug: false }
to createShopifyRetryLink
.
It utilizes @apollo/client/link/error
. This link checks how much cost needs to be restored in order to perform a GraphQL operation, allows you to wait until the operation can succeed. If the operation exceeds the maximum allowed cost of your Shopify API, the error will still be raised.
FAQs
Easy setup for retrying rate limited request in Shopify's (Admin) GraphQL API.
The npm package apollo-link-shopify-retry receives a total of 82 weekly downloads. As such, apollo-link-shopify-retry popularity was classified as not popular.
We found that apollo-link-shopify-retry demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.