From a7569921c3b47e1536c56f4847f3b3c921e1d1db Mon Sep 17 00:00:00 2001 From: Cyrbuzz Date: Thu, 11 Jan 2024 11:53:34 +0800 Subject: [PATCH] [release] @subql/apollo-links@1.2.6 @subql/network-support@0.1.1 * feat: use both agreements & flex plan * feat: version --- packages/apollo-links/CHANGELOG.md | 5 ++++- packages/apollo-links/package.json | 2 +- packages/apollo-links/src/core/errorLink.ts | 4 +++- packages/network-support/CHANGELOG.md | 5 ++++- packages/network-support/package.json | 2 +- packages/network-support/src/orderManager.ts | 16 ++++++---------- 6 files changed, 19 insertions(+), 15 deletions(-) diff --git a/packages/apollo-links/CHANGELOG.md b/packages/apollo-links/CHANGELOG.md index f1120e44..a6c2769b 100644 --- a/packages/apollo-links/CHANGELOG.md +++ b/packages/apollo-links/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.6] - 2024-01-11 + ## [1.2.5] - 2023-12-21 ## [1.2.4] - 2023-12-21 @@ -90,7 +92,8 @@ Breaking change for `dictHttpLink` and `deploymentHttpLink`, use `const { link } - Add Authlink for Apollo client -[unreleased]: https://github.com/subquery/network-clients/compare/v1.2.5...HEAD +[unreleased]: https://github.com/subquery/network-clients/compare/v1.2.6...HEAD +[1.2.6]: https://github.com/subquery/network-clients/compare/v1.2.4...v1.2.6 [1.2.5]: https://github.com/subquery/network-clients/compare/v1.2.4...v1.2.5 [1.2.4]: https://github.com/subquery/network-clients/compare/v1.2.3...v1.2.4 [1.2.3]: https://github.com/subquery/network-clients/compare/v1.2.2...v1.2.3 diff --git a/packages/apollo-links/package.json b/packages/apollo-links/package.json index 2597a44e..8517adc8 100644 --- a/packages/apollo-links/package.json +++ b/packages/apollo-links/package.json @@ -1,6 +1,6 @@ { "name": "@subql/apollo-links", - "version": "1.2.5", + "version": "1.2.6", "description": "SubQuery Network - graphql links", "main": "dist/index.js", "author": "SubQuery Pte Limited", diff --git a/packages/apollo-links/src/core/errorLink.ts b/packages/apollo-links/src/core/errorLink.ts index 6397ba30..f1320f15 100644 --- a/packages/apollo-links/src/core/errorLink.ts +++ b/packages/apollo-links/src/core/errorLink.ts @@ -21,7 +21,7 @@ export const creatErrorLink = ({ useImmediateFallbackOnError, logger, }: ErrorLinkOption) => - onError(({ graphQLErrors, networkError, operation }) => { + onError(({ graphQLErrors, networkError, operation, forward }) => { const { indexer } = operation.getContext(); if (networkError) { orderManager.updateScore(indexer, ScoreType.NETWORK); @@ -50,4 +50,6 @@ export const creatErrorLink = ({ ) as Observable; } } + + return forward(operation); }); diff --git a/packages/network-support/CHANGELOG.md b/packages/network-support/CHANGELOG.md index 26fb9b4d..2f788634 100644 --- a/packages/network-support/CHANGELOG.md +++ b/packages/network-support/CHANGELOG.md @@ -7,11 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.1] 2024-01-11 + ## [0.1.0] 2023-11-27 ### Added - It's a internal library. -[unreleased]: https://github.com/subquery/network-support/compare/v0.1.0...HEAD +[unreleased]: https://github.com/subquery/network-support/compare/v0.1.1...HEAD +[0.1.1]: https://github.com/subquery/network-support/releases/tag/v0.1.1 [0.1.0]: https://github.com/subquery/network-support/releases/tag/v0.1.0 diff --git a/packages/network-support/package.json b/packages/network-support/package.json index f6fa9fa2..c17c1f9e 100644 --- a/packages/network-support/package.json +++ b/packages/network-support/package.json @@ -1,6 +1,6 @@ { "name": "@subql/network-support", - "version": "0.1.0", + "version": "0.1.1", "main": "dist/index.js", "author": "SubQuery Pte Limited", "license": "Apache-2.0", diff --git a/packages/network-support/src/orderManager.ts b/packages/network-support/src/orderManager.ts index a359728e..d7d2e118 100644 --- a/packages/network-support/src/orderManager.ts +++ b/packages/network-support/src/orderManager.ts @@ -286,17 +286,13 @@ export class OrderManager { private async getNextOrder(): Promise { await this._init; - if (this.agreements.length) { - const order = await this.getNextAgreement(); - if (order) { - return { ...order, type: OrderType.agreement }; - } + const agreementsOrders = await this.getNextAgreement(); + if (agreementsOrders) { + return { ...agreementsOrders, type: OrderType.agreement }; } - if (this.plans.length) { - const order = await this.getNextPlan(); - if (order) { - return { ...order, type: OrderType.flexPlan }; - } + const flexPlanOrders = await this.getNextPlan(); + if (flexPlanOrders) { + return { ...flexPlanOrders, type: OrderType.flexPlan }; } return undefined; }