UNPKG

@aws-amplify/data-construct

Version:

AppSync GraphQL Api Construct using Amplify GraphQL Transformer - Aliased to use `Data` name scheme.

8 lines (7 loc) 191 B
export const retry = (toRetry, maxRetries) => { let promise = toRetry(); for (let i = 0; i < maxRetries; i++) { promise = promise.catch(toRetry); } return promise; };