Skip to content

Instantly share code, notes, and snippets.

@liamgriffin
Created April 30, 2021 13:19
Show Gist options
  • Save liamgriffin/dd1bddd05800eb0c7e895a6c9d7de581 to your computer and use it in GitHub Desktop.
Save liamgriffin/dd1bddd05800eb0c7e895a6c9d7de581 to your computer and use it in GitHub Desktop.
Implementing API Rate Limits
await graphQLClient.rawRequest(productUpdateMutation, productInput).then(({ errors, data, extensions, headers, status })) => {
console.log(JSON.stringify(data, undefined, 2))
console.log(`There are ${extensions.cost.throttleStatus.currentlyAvailable} rate limit points available/n`)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment