@aws-amplify/data-construct
Version:
AppSync GraphQL Api Construct using Amplify GraphQL Transformer - Aliased to use `Data` name scheme.
12 lines (11 loc) • 388 B
JavaScript
import { MAXIMUM_RETRY_DELAY } from "./constants";
export const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => {
const getRetryCount = () => retryCount;
const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay);
const getRetryCost = () => retryCost;
return {
getRetryCount,
getRetryDelay,
getRetryCost,
};
};