@ethlete/query 5.31.1 → 5.32.0

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.
@@ -65,6 +65,10 @@ export type QueryConfig = {
65
65
  * Does not affect mutations such as POST, PUT etc. since those are never executed automatically.
66
66
  */
67
67
  onlyManualExecution?: boolean;
68
+ /**
69
+ * If true, the query will not throw an error because a "withArgs()" feature is missing.
70
+ */
71
+ silenceMissingWithArgsFeatureError?: boolean;
68
72
  };
69
73
  export declare const splitQueryConfig: <TArgs extends QueryArgs>(args: (QueryFeature<TArgs> | QueryConfig)[]) => {
70
74
  features: QueryFeature<TArgs>[];
@@ -6,6 +6,7 @@ export declare const enum QueryRuntimeErrorCode {
6
6
  WITH_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD = 101,
7
7
  WITH_AUTO_REFRESH_USED_ON_UNSUPPORTED_HTTP_METHOD = 102,
8
8
  WITH_AUTO_REFRESH_USED_IN_MANUAL_QUERY = 103,
9
+ SILENCE_MISSING_WITH_ARGS_FEATURE_ERROR_USED_BUT_WITH_ARGS_PRESENT = 104,
9
10
  COOKIE_LOGIN_TRIED_BUT_COOKIE_DISABLED = 200,
10
11
  ENABLE_COOKIE_CALLED_WITHOUT_COOKIE_CONFIG = 201,
11
12
  DISABLE_COOKIE_CALLED_WITHOUT_COOKIE_CONFIG = 202,
@@ -31,6 +32,7 @@ export declare const withArgsQueryFeatureMissingButRouteIsFunction: () => Runtim
31
32
  export declare const withPollingUsedOnUnsupportedHttpMethod: (method: string) => RuntimeError<QueryRuntimeErrorCode.WITH_POLLING_USED_ON_UNSUPPORTED_HTTP_METHOD>;
32
33
  export declare const withAutoRefreshUsedOnUnsupportedHttpMethod: (method: string) => RuntimeError<QueryRuntimeErrorCode.WITH_AUTO_REFRESH_USED_ON_UNSUPPORTED_HTTP_METHOD>;
33
34
  export declare const withAutoRefreshUsedInManualQuery: () => RuntimeError<QueryRuntimeErrorCode.WITH_AUTO_REFRESH_USED_IN_MANUAL_QUERY>;
35
+ export declare const silenceMissingWithArgsFeatureErrorUsedButWithArgsPresent: () => RuntimeError<QueryRuntimeErrorCode.SILENCE_MISSING_WITH_ARGS_FEATURE_ERROR_USED_BUT_WITH_ARGS_PRESENT>;
34
36
  export declare const cookieLoginTriedButCookieDisabled: () => RuntimeError<QueryRuntimeErrorCode.COOKIE_LOGIN_TRIED_BUT_COOKIE_DISABLED>;
35
37
  export declare const enableCookieCalledWithoutCookieConfig: () => RuntimeError<QueryRuntimeErrorCode.ENABLE_COOKIE_CALLED_WITHOUT_COOKIE_CONFIG>;
36
38
  export declare const disableCookieCalledWithoutCookieConfig: () => RuntimeError<QueryRuntimeErrorCode.DISABLE_COOKIE_CALLED_WITHOUT_COOKIE_CONFIG>;
@@ -24,6 +24,10 @@ export type InternalRunQueryExecuteOptions = {
24
24
  * - `undefined` means the request will be cached if the method is GET, OPTIONS or HEAD
25
25
  */
26
26
  useQueryRepositoryCache?: boolean;
27
+ /**
28
+ * If true, the query will be forced to use JSON.stringify on the query params.
29
+ */
30
+ forceJsonStringifyInQueryParams?: boolean;
27
31
  };
28
32
  export type QueryExecuteOptions<TArgs extends QueryArgs> = {
29
33
  executeOptions: CreateQueryExecuteOptions<TArgs>;
@@ -123,4 +123,11 @@ export interface BuildQueryStringConfig {
123
123
  * @default [isNaN, isEmptyString]
124
124
  */
125
125
  ignoredValuesFns?: Array<(value: unknown) => boolean>;
126
+ /**
127
+ * Whether to use `JSON.stringify` for nested objects.
128
+ * Should be used for GraphQL queries.
129
+ *
130
+ * @default false
131
+ */
132
+ useJsonStringify?: boolean;
126
133
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ethlete/query",
3
- "version": "5.31.1",
3
+ "version": "5.32.0",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
- "@angular/common": "19.1.7",
7
- "@angular/core": "19.1.7",
8
- "@angular/forms": "19.1.7",
9
- "@angular/router": "19.1.7",
6
+ "@angular/common": "19.2.0",
7
+ "@angular/core": "19.2.0",
8
+ "@angular/forms": "19.2.0",
9
+ "@angular/router": "19.2.0",
10
10
  "@ethlete/core": "^4.0.3",
11
11
  "@ethlete/types": "^1.6.2",
12
12
  "rxjs": "7.8.2",