Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
url: this.endpoint,
}),
__DEV__ ? loggerMiddleware() : null,
// __DEV__ ? perfMiddleware() : null,
!__DEV__
? retryMiddleware({
// [3200, 6400, 12800, 25600, 51200, 102400, 204800, 409600, ...],
retryDelays: attempt => 2 ** (attempt + 4) * 100,
forceRetry: (cb, delay) => {
window.forceRelayRetry = cb;
// eslint-disable-next-line
console.log(`call 'forceRelayRetry()' for immediately retry! Or wait ${delay} ms.`);
},
})
: null,
__DEV__ ? gqlErrorsMiddleware() : null,
].filter(o => !!o)
);
}