Comparing version 1.2.7 to 1.2.8
@@ -10,3 +10,3 @@ import GQLResultInterface, { GQLEdgeInterface, GQLNodeInterface } from "./faces"; | ||
} | ||
export declare function arGql(endpointUrl?: string): ArGqlInterface; | ||
export declare function arGql(endpointUrl?: string, retry?: number): ArGqlInterface; | ||
/** some useful constants */ | ||
@@ -13,0 +13,0 @@ export declare const GQLUrls: { |
@@ -5,3 +5,4 @@ "use strict"; | ||
const tx_1 = require("./queries/tx"); | ||
function arGql(endpointUrl) { | ||
const fetchRetry_1 = require("./utils/fetchRetry"); | ||
function arGql(endpointUrl, retry = 0) { | ||
//sanity check | ||
@@ -17,3 +18,3 @@ if (endpointUrl && !endpointUrl.match(/^https?:\/\/.*\/graphql$/)) { | ||
}); | ||
const res = await fetch(_endpointUrl, { | ||
const res = await (0, fetchRetry_1.fetchRetry)(_endpointUrl, { | ||
method: 'POST', | ||
@@ -25,3 +26,3 @@ headers: { | ||
body: graphql, | ||
}); | ||
}, retry); | ||
if (!res.ok) { | ||
@@ -28,0 +29,0 @@ throw new Error(res.statusText, { cause: res.status }); |
{ | ||
"name": "ar-gql", | ||
"version": "1.2.7", | ||
"version": "1.2.8", | ||
"main": "dist/index", | ||
@@ -5,0 +5,0 @@ "types": "dist/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10905
11
222