mobx-tanstack-query-api 0.0.64 → 0.0.65
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/package.json
CHANGED
|
@@ -2,6 +2,6 @@ import { InvalidateOptions } from '@tanstack/query-core';
|
|
|
2
2
|
import { QueryClient } from 'mobx-tanstack-query';
|
|
3
3
|
import { InvalidateEndpointsFilters } from './endpoint-query-client.types.js';
|
|
4
4
|
export declare class EndpointQueryClient extends QueryClient {
|
|
5
|
-
invalidateEndpoints({ group, namespace, operationId, tag, predicate, ...queryFilters }: InvalidateEndpointsFilters, options?: InvalidateOptions): Promise<void>;
|
|
5
|
+
invalidateEndpoints({ group, namespace, operationId, tag, predicate, endpoint, ...queryFilters }: InvalidateEndpointsFilters, options?: InvalidateOptions): Promise<void>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=endpoint-query-client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"endpoint-query-client.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAEL,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;AAG1C,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,mBAAmB,CACjB,EACE,KAAK,EACL,SAAS,EACT,WAAW,EACX,GAAG,EACH,SAAS,EACT,GAAG,YAAY,EAChB,EAAE,0BAA0B,EAC7B,OAAO,CAAC,EAAE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"endpoint-query-client.d.ts","sourceRoot":"","sources":["../../src/runtime/endpoint-query-client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAElD,OAAO,EAEL,0BAA0B,EAC3B,MAAM,kCAAkC,CAAC;AAG1C,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,mBAAmB,CACjB,EACE,KAAK,EACL,SAAS,EACT,WAAW,EACX,GAAG,EACH,SAAS,EACT,QAAQ,EACR,GAAG,YAAY,EAChB,EAAE,0BAA0B,EAC7B,OAAO,CAAC,EAAE,iBAAiB;CAgE9B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { QueryClient } from 'mobx-tanstack-query';
|
|
2
2
|
export class EndpointQueryClient extends QueryClient {
|
|
3
|
-
invalidateEndpoints({ group, namespace, operationId, tag, predicate, ...queryFilters }, options) {
|
|
3
|
+
invalidateEndpoints({ group, namespace, operationId, tag, predicate, endpoint, ...queryFilters }, options) {
|
|
4
4
|
return this.invalidateQueries({
|
|
5
5
|
...queryFilters,
|
|
6
6
|
// eslint-disable-next-line sonarjs/no-invariant-returns
|
|
@@ -9,6 +9,14 @@ export class EndpointQueryClient extends QueryClient {
|
|
|
9
9
|
return false;
|
|
10
10
|
}
|
|
11
11
|
const meta = query.meta;
|
|
12
|
+
if (endpoint) {
|
|
13
|
+
const endpointsToFilter = Array.isArray(endpoint)
|
|
14
|
+
? endpoint
|
|
15
|
+
: [endpoint];
|
|
16
|
+
if (endpointsToFilter.every((endpoint) => meta.endpointId !== endpoint.endpointId)) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
12
20
|
if (namespace &&
|
|
13
21
|
meta.namespace &&
|
|
14
22
|
!applyStringFilter(namespace, meta.namespace)) {
|