@ethlete/query 5.30.0 → 5.30.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/fesm2022/ethlete-query.mjs +5 -2
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ethlete/query
|
|
2
2
|
|
|
3
|
+
## 5.30.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`7726bcd`](https://github.com/ethlete-io/ethdk/commit/7726bcd4ed5719718a3b6bb3d56cba05522be91b) Thanks [@TomTomB](https://github.com/TomTomB)! - Secure query race condition
|
|
8
|
+
|
|
9
|
+
## 5.30.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`ca5f51a`](https://github.com/ethlete-io/ethdk/commit/ca5f51a8a04583126bbc946d110137f28f9f2b36) Thanks [@TomTomB](https://github.com/TomTomB)! - Only set error list is list to true if there is more than 1 error inside
|
|
14
|
+
|
|
3
15
|
## 5.30.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -3492,7 +3492,7 @@ const createQueryErrorResponse = (error) => {
|
|
|
3492
3492
|
errorList.push({ message: error });
|
|
3493
3493
|
}
|
|
3494
3494
|
}
|
|
3495
|
-
if (errorList.length >
|
|
3495
|
+
if (errorList.length > 1) {
|
|
3496
3496
|
return {
|
|
3497
3497
|
isList: true,
|
|
3498
3498
|
errors: errorList,
|
|
@@ -4424,7 +4424,10 @@ const createSecureExecuteFn = (options) => {
|
|
|
4424
4424
|
authQuerySubscription = Subscription.EMPTY;
|
|
4425
4425
|
cleanupPreviousExecute({ executeOptions: options, executeState });
|
|
4426
4426
|
const authQuery = authProvider.latestExecutedQuery();
|
|
4427
|
-
if
|
|
4427
|
+
// This might happen if a secure query gets executed while the auth query has just been created.
|
|
4428
|
+
// This is due to the fact that the query state is being synced with the state inside the http request using effect.
|
|
4429
|
+
const isAuthQueryFreshlyExecuted = authQuery?.lastTimeExecutedAt() === null;
|
|
4430
|
+
if (!authQuery || authQuery.loading() || isAuthQueryFreshlyExecuted) {
|
|
4428
4431
|
options.state.loading.set({ executeTime: Date.now(), progress: null });
|
|
4429
4432
|
authQuerySubscription = toObservable(authProvider.latestExecutedQuery, { injector: options.deps.injector })
|
|
4430
4433
|
.pipe(switchMap((query) => {
|