@rsdk/graphql 4.0.0-next.14 → 4.0.0-next.15
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 +18 -6
- package/dist/error-handling/graphql-errors.formatter.d.ts +1 -2
- package/dist/error-handling/graphql-errors.formatter.js +1 -3
- package/dist/error-handling/graphql-errors.formatter.js.map +1 -1
- package/dist/error-handling/graphql-errors.sender.d.ts +1 -1
- package/dist/error-handling/graphql-errors.sender.js +1 -3
- package/dist/error-handling/graphql-errors.sender.js.map +1 -1
- package/dist/graphql-logger.interceptor.js.map +1 -1
- package/dist/graphql.plugin.js.map +1 -1
- package/package.json +6 -6
- package/src/error-handling/graphql-errors.formatter.ts +2 -5
- package/src/error-handling/graphql-errors.sender.ts +1 -3
- package/tsconfig.json +12 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.0.0-next.15](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.14...v4.0.0-next.15) (2023-11-30)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* added protocol detector ([#166](https://github.com/R-Vision/rsdk/issues/166)) ([f348995](https://github.com/R-Vision/rsdk/commit/f348995f29648c7392b7375c5b2001197d60eb36))
|
|
11
|
+
|
|
6
12
|
## [4.0.0-next.14](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.13...v4.0.0-next.14) (2023-11-29)
|
|
7
13
|
|
|
8
14
|
### Features
|
|
@@ -27,7 +33,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
33
|
|
|
28
34
|
### Features
|
|
29
35
|
|
|
30
|
-
* added configuration for request logging and move to trace level all request
|
|
36
|
+
* added configuration for request logging and move to trace level all request
|
|
37
|
+
logging ([#158](https://github.com/R-Vision/rsdk/issues/158)) ([0304672](https://github.com/R-Vision/rsdk/commit/0304672c112fd626642a2d44b0384fbf188e71b4))
|
|
31
38
|
|
|
32
39
|
## [4.0.0-next.9](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.8...v4.0.0-next.9) (2023-11-29)
|
|
33
40
|
|
|
@@ -57,7 +64,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
57
64
|
|
|
58
65
|
### Bug Fixes
|
|
59
66
|
|
|
60
|
-
* all yarn peers dependency
|
|
67
|
+
* all yarn peers dependency
|
|
68
|
+
issues ([e0db9ef](https://github.com/R-Vision/rsdk/commit/e0db9ef1ab8a4df4e1f8ff6f6a9e3728f497549b))
|
|
61
69
|
|
|
62
70
|
## [4.0.0-next.2](https://github.com/R-Vision/rsdk/compare/v4.0.0-next.1...v4.0.0-next.2) (2023-11-10)
|
|
63
71
|
|
|
@@ -227,7 +235,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
227
235
|
|
|
228
236
|
### Bug Fixes
|
|
229
237
|
|
|
230
|
-
* **deps:** correctly
|
|
238
|
+
* **deps:** correctly
|
|
239
|
+
peerDependencies ([349628f](https://github.com/R-Vision/rsdk/commit/349628f10da46a30d6c8b9f9387e010869318212))
|
|
231
240
|
|
|
232
241
|
## [3.0.1-next.0](https://github.com/R-Vision/rsdk/compare/v3.0.0...v3.0.1-next.0) (2023-08-07)
|
|
233
242
|
|
|
@@ -353,7 +362,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
353
362
|
|
|
354
363
|
### Bug Fixes
|
|
355
364
|
|
|
356
|
-
* remove private dependencies from `peerDependencies`
|
|
365
|
+
* remove private dependencies from `peerDependencies`
|
|
366
|
+
section ([0bce6ff](https://github.com/R-Vision/rsdk/commit/0bce6ffb5b699e2ed1dc9aca77cbdbf085267ff7))
|
|
357
367
|
|
|
358
368
|
## 1.0.11 (2023-05-23)
|
|
359
369
|
|
|
@@ -363,7 +373,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
363
373
|
|
|
364
374
|
### Bug Fixes
|
|
365
375
|
|
|
366
|
-
* add "access: public" to new
|
|
376
|
+
* add "access: public" to new
|
|
377
|
+
packages ([04d5983](https://github.com/R-Vision/rsdk/commit/04d5983cfa3e97c5d8219e07208a0499a8c6bc83))
|
|
367
378
|
|
|
368
379
|
## 1.0.9 (2023-05-21)
|
|
369
380
|
|
|
@@ -393,7 +404,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
393
404
|
|
|
394
405
|
### Bug Fixes
|
|
395
406
|
|
|
396
|
-
* builtin make not private in
|
|
407
|
+
* builtin make not private in
|
|
408
|
+
npm ([50c83b6](https://github.com/R-Vision/rsdk/commit/50c83b6454f9a89f1e99d3b33a497ce2c029d8c6))
|
|
397
409
|
|
|
398
410
|
## 1.0.2 (2023-05-10)
|
|
399
411
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ArgumentsHost } from '@nestjs/common';
|
|
2
1
|
import type { IErrorsFormatter } from '@rsdk/core';
|
|
3
2
|
import type { GraphQLFormattedError } from 'graphql';
|
|
4
3
|
import { GraphQLError } from 'graphql';
|
|
@@ -11,7 +10,7 @@ import { GraphQLError } from 'graphql';
|
|
|
11
10
|
* в ErrorsFormatter) и нормализация объектов.
|
|
12
11
|
*/
|
|
13
12
|
export declare class GraphQLErrorsFormatter implements IErrorsFormatter {
|
|
13
|
+
protocol: string;
|
|
14
14
|
static finalFormat(formattedError: GraphQLFormattedError, _error: unknown): GraphQLFormattedError;
|
|
15
|
-
match(host: ArgumentsHost): boolean;
|
|
16
15
|
format(ex: unknown, verbose?: boolean): GraphQLError;
|
|
17
16
|
}
|
|
@@ -15,6 +15,7 @@ const DEFAULT_MESSAGE = 'Something went wrong';
|
|
|
15
15
|
* в ErrorsFormatter) и нормализация объектов.
|
|
16
16
|
*/
|
|
17
17
|
class GraphQLErrorsFormatter {
|
|
18
|
+
protocol = 'graphql';
|
|
18
19
|
static finalFormat(formattedError,
|
|
19
20
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20
21
|
_error) {
|
|
@@ -34,9 +35,6 @@ class GraphQLErrorsFormatter {
|
|
|
34
35
|
}),
|
|
35
36
|
};
|
|
36
37
|
}
|
|
37
|
-
match(host) {
|
|
38
|
-
return host.getType() === 'graphql';
|
|
39
|
-
}
|
|
40
38
|
format(ex, verbose) {
|
|
41
39
|
if (ex instanceof core_1.PipelineException) {
|
|
42
40
|
const formatVerbose = verbose || ALWAYS_VERBOSE.has(ex.kind);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-errors.formatter.js","sourceRoot":"","sources":["../../src/error-handling/graphql-errors.formatter.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"graphql-errors.formatter.js","sourceRoot":"","sources":["../../src/error-handling/graphql-errors.formatter.ts"],"names":[],"mappings":";;;AAAA,yCAAyD;AAEzD,qCAA8D;AAE9D,qCAAuC;AAEvC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAC,CAAC,oBAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACtD,MAAM,eAAe,GAAG,sBAAsB,CAAC;AAE/C;;;;;;;GAOG;AACH,MAAa,sBAAsB;IACjC,QAAQ,GAAG,SAAS,CAAC;IAErB,MAAM,CAAC,WAAW,CAChB,cAAqC;IACrC,6DAA6D;IAC7D,MAAe;QAEf,OAAO,cAAc,CAAC,UAAU,EAAE,SAAS,CAAC;QAE5C,OAAO;YACL,OAAO,EAAE,cAAc,CAAC,OAAO;YAC/B,GAAG,CAAC,cAAc,CAAC,IAAI,IAAI;gBACzB,IAAI,EAAE,cAAc,CAAC,IAAI;aAC1B,CAAC;YAEF,GAAG,CAAC,cAAc,CAAC,SAAS,IAAI;gBAC9B,SAAS,EAAE,cAAc,CAAC,SAAS;aACpC,CAAC;YAEF,UAAU,EAAE,IAAA,mBAAU,GAAE,CAAC,cAAc,CAAC,UAAU,EAAE;gBAClD,mDAAmD;gBACnD,UAAU,EAAE,CAAC,OAAO,CAAC;gBACrB,QAAQ,EAAE,sBAAa;aACxB,CAA4B;SAC9B,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,EAAW,EAAE,OAAiB;QACnC,IAAI,EAAE,YAAY,wBAAiB,EAAE,CAAC;YACpC,MAAM,aAAa,GAAG,OAAO,IAAI,cAAc,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;YAE7D,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC;YAE1C,MAAM,OAAO,GAAG,aAAa;gBAC3B,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,wBAAiB,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;gBAClE,CAAC,CAAC,eAAe,CAAC;YAEpB,OAAO,IAAI,sBAAY,CAAC,OAAO,EAAE;gBAC/B,UAAU,EAAE;oBACV,IAAI,EAAE,oBAAa,CAAC,IAAI,CAAC;oBAEzB,IAAI;oBACJ;;;uBAGG;oBACH,GAAG,CAAC,OAAO,IAAI;wBACb,KAAK;wBACL,OAAO;qBACR,CAAC;iBACH;aACF,CAAC,CAAC;QACL,CAAC;QAED,MAAM,OAAO,GAAG,OAAO;YACrB,CAAC,CAAE,EAAU,CAAC,OAAO,IAAI,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;YAC3C,CAAC,CAAC,eAAe,CAAC;QAEpB,OAAO,IAAI,sBAAY,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACF;AA7DD,wDA6DC"}
|
|
@@ -2,6 +2,6 @@ import type { ArgumentsHost } from '@nestjs/common';
|
|
|
2
2
|
import type { IErrorsSender } from '@rsdk/core';
|
|
3
3
|
import type { Observable } from 'rxjs';
|
|
4
4
|
export declare class GraphQLErrorsSender implements IErrorsSender {
|
|
5
|
-
|
|
5
|
+
protocol: string;
|
|
6
6
|
send(_host: ArgumentsHost, ex: unknown): Observable<never>;
|
|
7
7
|
}
|
|
@@ -2,9 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GraphQLErrorsSender = void 0;
|
|
4
4
|
class GraphQLErrorsSender {
|
|
5
|
-
|
|
6
|
-
return host.getType() === 'graphql';
|
|
7
|
-
}
|
|
5
|
+
protocol = 'graphql';
|
|
8
6
|
send(_host, ex) {
|
|
9
7
|
// Only throwing will provision exception data to apollo-server
|
|
10
8
|
throw ex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-errors.sender.js","sourceRoot":"","sources":["../../src/error-handling/graphql-errors.sender.ts"],"names":[],"mappings":";;;AAIA,MAAa,mBAAmB;IAC9B,
|
|
1
|
+
{"version":3,"file":"graphql-errors.sender.js","sourceRoot":"","sources":["../../src/error-handling/graphql-errors.sender.ts"],"names":[],"mappings":";;;AAIA,MAAa,mBAAmB;IAC9B,QAAQ,GAAG,SAAS,CAAC;IAErB,IAAI,CAAC,KAAoB,EAAE,EAAW;QACpC,+DAA+D;QAC/D,MAAM,EAAE,CAAC;IACX,CAAC;CACF;AAPD,kDAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql-logger.interceptor.js","sourceRoot":"","sources":["../src/graphql-logger.interceptor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAKA,2CAA4C;AAE5C,6CAAsD;AACtD,qCAA0C;AAG1C,oEAAiE;AACjE,mEAAgE;AAChE,qDAAkD;AAElD,qDAAiD;AAG1C,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAEe;IACxC;IAFV,YACkD,MAAe,EACvD,aAA4B;QADY,WAAM,GAAN,MAAM,CAAS;QACvD,kBAAa,GAAb,aAAa,CAAe;IACnC,CAAC;IAEJ,SAAS,CACP,OAAyB,EACzB,IAAsB;QAEtB,IAAI,CAA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AAC,CAAC;oBAE/D,2BAA2B,EAAE,IAAI;oBACjC,aAAa,EAAE,MAAM,CAAC,UAAU;oBAChC,UAAU,EAAE,MAAM,CAAC,UAAU;wBAC3B,CAAC,CAAC;4BACE,QAAQ,EAAE,IAAI,CAAC,IAAI;4BACnB,oBAAoB,EAAE,IAAI,CAAC,IAAI;yBAChC;wBACH,CAAC,CAAC,KAAK;oBACT,aAAa,EAAE;wBACb,YAAY,EAAE;4BACZ,SAAS;4BACT,IAAI,EAAE,IAAI,CAAC,IAAI;yBAChB;wBAED,iEAAiE;wBACjE,8DAA8D;wBAC9D,gBAAgB;wBAChB,GAAG,CAAC,MAAM,CAAC,UAAU,IAAI;4BACvB,4BAA4B,EAAE;gCAC5B,SAAS;gCACT,IAAI,EAAE,IAAI,CAAC,IAAI;6BAChB;yBACF,CAAC;qBACH;oBACD,eAAe,EAAE,IAAI;oBACrB,sEAAsE;oBACtE,wCAAwC;iBACzC,CAAC;aACH,CAAC;SACH,CAAC;IACJ,CAAC;IAED,mBAAmB,CAAC,QAA4B;QAC9C,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;YACvD,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAClD,CAAC;IACH,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,uCAAsB,EAAE,CAAC;IACtC,CAAC;IAED,WAAW;QACT,OAAO,IAAI,oCAAmB,EAAE,CAAC;IACnC,CAAC;CACF;AAxGD,sCAwGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdk/graphql",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.15",
|
|
4
4
|
"description": "Plugin for graphql",
|
|
5
5
|
"license": "Apache License 2.0",
|
|
6
6
|
"publishConfig": {
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
"@nestjs/common": "^10.0.0",
|
|
23
23
|
"@nestjs/core": "^10.0.0",
|
|
24
24
|
"@nestjs/graphql": "^12.0.8",
|
|
25
|
-
"@rsdk/common": "^4.0.0-next.
|
|
26
|
-
"@rsdk/core": "^4.0.0-next.
|
|
27
|
-
"@rsdk/http.server.express": "^4.0.0-next.
|
|
28
|
-
"@rsdk/logging": "^4.0.0-next.
|
|
25
|
+
"@rsdk/common": "^4.0.0-next.15",
|
|
26
|
+
"@rsdk/core": "^4.0.0-next.15",
|
|
27
|
+
"@rsdk/http.server.express": "^4.0.0-next.15",
|
|
28
|
+
"@rsdk/logging": "^4.0.0-next.15",
|
|
29
29
|
"graphql": "^16.6.0",
|
|
30
30
|
"graphql-subscriptions": "^2.0.0",
|
|
31
31
|
"reflect-metadata": "^0.1.13",
|
|
32
32
|
"rxjs": "^7.8.1"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "8abd89d7800375749b024410dc3465ff40389277"
|
|
35
35
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ArgumentsHost } from '@nestjs/common';
|
|
2
1
|
import { normalizer, sortErrorKeys } from '@rsdk/common';
|
|
3
2
|
import type { IErrorsFormatter } from '@rsdk/core';
|
|
4
3
|
import { ExceptionKind, PipelineException } from '@rsdk/core';
|
|
@@ -17,6 +16,8 @@ const DEFAULT_MESSAGE = 'Something went wrong';
|
|
|
17
16
|
* в ErrorsFormatter) и нормализация объектов.
|
|
18
17
|
*/
|
|
19
18
|
export class GraphQLErrorsFormatter implements IErrorsFormatter {
|
|
19
|
+
protocol = 'graphql';
|
|
20
|
+
|
|
20
21
|
static finalFormat(
|
|
21
22
|
formattedError: GraphQLFormattedError,
|
|
22
23
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -42,10 +43,6 @@ export class GraphQLErrorsFormatter implements IErrorsFormatter {
|
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
match(host: ArgumentsHost): boolean {
|
|
46
|
-
return host.getType<'graphql'>() === 'graphql';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
46
|
format(ex: unknown, verbose?: boolean): GraphQLError {
|
|
50
47
|
if (ex instanceof PipelineException) {
|
|
51
48
|
const formatVerbose = verbose || ALWAYS_VERBOSE.has(ex.kind);
|
|
@@ -3,9 +3,7 @@ import type { IErrorsSender } from '@rsdk/core';
|
|
|
3
3
|
import type { Observable } from 'rxjs';
|
|
4
4
|
|
|
5
5
|
export class GraphQLErrorsSender implements IErrorsSender {
|
|
6
|
-
|
|
7
|
-
return host.getType<'graphql'>() === 'graphql';
|
|
8
|
-
}
|
|
6
|
+
protocol = 'graphql';
|
|
9
7
|
|
|
10
8
|
send(_host: ArgumentsHost, ex: unknown): Observable<never> {
|
|
11
9
|
// Only throwing will provision exception data to apollo-server
|
package/tsconfig.json
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
"declaration": true,
|
|
5
5
|
"outDir": "dist"
|
|
6
6
|
},
|
|
7
|
-
"include": [
|
|
8
|
-
|
|
7
|
+
"include": [
|
|
8
|
+
"src/**/*"
|
|
9
|
+
],
|
|
10
|
+
"exclude": [
|
|
11
|
+
"node_modules",
|
|
12
|
+
"dist",
|
|
13
|
+
"test",
|
|
14
|
+
"**/*.spec.ts",
|
|
15
|
+
"**/*.test.ts",
|
|
16
|
+
"**/*.spec.e2e.ts",
|
|
17
|
+
"**/*.test.e2e.ts"
|
|
18
|
+
]
|
|
9
19
|
}
|