@subql/apollo-links
Advanced tools
Comparing version 1.2.0 to 1.2.1-0
@@ -11,2 +11,3 @@ import { ApolloLink } from '@apollo/client/core'; | ||
scoreStore?: IStore; | ||
maxRetries?: number; | ||
} | ||
@@ -13,0 +14,0 @@ interface DictAuthOptions extends BaseAuthOptions { |
@@ -21,3 +21,3 @@ "use strict"; | ||
function authHttpLink(options) { | ||
const { deploymentId, httpOptions, fallbackServiceUrl, authUrl, projectType, logger: _logger, } = options; | ||
const { deploymentId, httpOptions, fallbackServiceUrl, authUrl, projectType, maxRetries, logger: _logger, } = options; | ||
const logger = _logger !== null && _logger !== void 0 ? _logger : (0, logger_1.silentLogger)(); | ||
@@ -30,3 +30,3 @@ const orderManager = new orderManager_1.OrderManager({ | ||
}); | ||
const retryLink = (0, core_2.createRetryLink)({ orderManager, logger }); | ||
const retryLink = (0, core_2.createRetryLink)({ orderManager, logger, maxRetries }); | ||
const fallbackLink = new core_2.FallbackLink(fallbackServiceUrl, logger); | ||
@@ -33,0 +33,0 @@ const httpLink = new core_2.DynamicHttpLink({ httpOptions, logger }); |
@@ -7,3 +7,3 @@ "use strict"; | ||
const retry_1 = require("@apollo/client/link/retry"); | ||
const createRetryLink = ({ orderManager, maxRetries = 8, logger }) => new retry_1.RetryLink({ | ||
const createRetryLink = ({ orderManager, maxRetries = 3, logger }) => new retry_1.RetryLink({ | ||
attempts: function (count, operation, error) { | ||
@@ -10,0 +10,0 @@ var _a; |
{ | ||
"name": "@subql/apollo-links", | ||
"version": "1.2.0", | ||
"version": "1.2.1-0", | ||
"description": "SubQuery Network - graphql links", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -26,2 +26,3 @@ // Copyright 2020-2022 SubQuery Pte Ltd authors & contributors | ||
scoreStore?: IStore; // pass store in, so it doesn't get lost between page refresh | ||
maxRetries?: number; | ||
} | ||
@@ -62,2 +63,3 @@ | ||
projectType, | ||
maxRetries, | ||
logger: _logger, | ||
@@ -74,3 +76,3 @@ } = options; | ||
const retryLink = createRetryLink({ orderManager, logger }); | ||
const retryLink = createRetryLink({ orderManager, logger, maxRetries }); | ||
const fallbackLink = new FallbackLink(fallbackServiceUrl, logger); | ||
@@ -77,0 +79,0 @@ const httpLink = new DynamicHttpLink({ httpOptions, logger }); |
@@ -15,3 +15,3 @@ // Copyright 2020-2022 SubQuery Pte Ltd authors & contributors | ||
export const createRetryLink = ({ orderManager, maxRetries = 8, logger }: RetryLinkOption) => | ||
export const createRetryLink = ({ orderManager, maxRetries = 3, logger }: RetryLinkOption) => | ||
new RetryLink({ | ||
@@ -18,0 +18,0 @@ attempts: function (count: number, operation: Operation, error: any) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
212500
1961
2