Merged in feat/sw-3623-fetchretry (pull request #3180)
feat(SW_3623): remove fetch-retry * feat(SW_3623): remove fetch-retry Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import fetchRetry from "fetch-retry"
|
||||
import { type DocumentNode, print } from "graphql"
|
||||
import { GraphQLClient } from "graphql-request"
|
||||
import stringify from "json-stable-stringify-without-jsonify"
|
||||
@@ -77,13 +76,7 @@ function internalRequest<T>(
|
||||
url: URL | RequestInfo,
|
||||
params?: RequestInit
|
||||
) {
|
||||
const wrappedFetch = fetchRetry(fetch, {
|
||||
retries: 2,
|
||||
retryDelay: function (attempt) {
|
||||
return Math.pow(2, attempt) * 150 // 150, 300, 600
|
||||
},
|
||||
})
|
||||
return wrappedFetch(url, {
|
||||
return fetch(url, {
|
||||
...params,
|
||||
signal: AbortSignal.timeout(15_000),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user