@axinom/mosaic-service-common 0.9.0 → 0.10.0-rc.3

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.
@@ -30,6 +30,10 @@ export declare enum ErrorCode {
30
30
  * This code is used when an error is thrown by a database constraint that we expect and explicitly handle.
31
31
  */
32
32
  DatabaseValidationFailed = "DATABASE_VALIDATION_FAILED",
33
+ /**
34
+ * This code is used when an error is thrown by a row-level security permission check.
35
+ */
36
+ UserNotAuthorized = "USER_NOT_AUTHORIZED",
33
37
  /**
34
38
  * This code is used when an error is thrown by the GraphQL engine, e.g. when a GraphQL request is made with incorrect syntax or parameters.
35
39
  */
@@ -1 +1 @@
1
- {"version":3,"file":"error-code.d.ts","sourceRoot":"","sources":["../../../src/common/errors/error-code.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS;IACnB;;OAEG;IACH,mBAAmB,0BAA0B;IAC7C;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,cAAc,oBAAoB;IAClC;;OAEG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,QAAQ,cAAc;IAEtB;;OAEG;IACH,wBAAwB,+BAA+B;IAEvD;;OAEG;IACH,uBAAuB,8BAA8B;CACtD"}
1
+ {"version":3,"file":"error-code.d.ts","sourceRoot":"","sources":["../../../src/common/errors/error-code.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,SAAS;IACnB;;OAEG;IACH,mBAAmB,0BAA0B;IAC7C;;OAEG;IACH,sBAAsB,6BAA6B;IACnD;;OAEG;IACH,cAAc,oBAAoB;IAClC;;OAEG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,YAAY,kBAAkB;IAC9B;;OAEG;IACH,QAAQ,cAAc;IACtB;;OAEG;IACH,wBAAwB,+BAA+B;IACvD;;OAEG;IACH,iBAAiB,wBAAwB;IACzC;;OAEG;IACH,uBAAuB,8BAA8B;CACtD"}
@@ -34,6 +34,10 @@ var ErrorCode;
34
34
  * This code is used when an error is thrown by a database constraint that we expect and explicitly handle.
35
35
  */
36
36
  ErrorCode["DatabaseValidationFailed"] = "DATABASE_VALIDATION_FAILED";
37
+ /**
38
+ * This code is used when an error is thrown by a row-level security permission check.
39
+ */
40
+ ErrorCode["UserNotAuthorized"] = "USER_NOT_AUTHORIZED";
37
41
  /**
38
42
  * This code is used when an error is thrown by the GraphQL engine, e.g. when a GraphQL request is made with incorrect syntax or parameters.
39
43
  */
@@ -1 +1 @@
1
- {"version":3,"file":"error-code.js","sourceRoot":"","sources":["../../../src/common/errors/error-code.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SAmCX;AAnCD,WAAY,SAAS;IACnB;;OAEG;IACH,0DAA6C,CAAA;IAC7C;;OAEG;IACH,gEAAmD,CAAA;IACnD;;OAEG;IACH,+CAAkC,CAAA;IAClC;;OAEG;IACH,2CAA8B,CAAA;IAC9B;;OAEG;IACH,2CAA8B,CAAA;IAC9B;;OAEG;IACH,mCAAsB,CAAA;IAEtB;;OAEG;IACH,oEAAuD,CAAA;IAEvD;;OAEG;IACH,kEAAqD,CAAA;AACvD,CAAC,EAnCW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAmCpB"}
1
+ {"version":3,"file":"error-code.js","sourceRoot":"","sources":["../../../src/common/errors/error-code.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,SAqCX;AArCD,WAAY,SAAS;IACnB;;OAEG;IACH,0DAA6C,CAAA;IAC7C;;OAEG;IACH,gEAAmD,CAAA;IACnD;;OAEG;IACH,+CAAkC,CAAA;IAClC;;OAEG;IACH,2CAA8B,CAAA;IAC9B;;OAEG;IACH,2CAA8B,CAAA;IAC9B;;OAEG;IACH,mCAAsB,CAAA;IACtB;;OAEG;IACH,oEAAuD,CAAA;IACvD;;OAEG;IACH,sDAAyC,CAAA;IACzC;;OAEG;IACH,kEAAqD,CAAA;AACvD,CAAC,EArCW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAqCpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-errors-handler-mappers.d.ts","sourceRoot":"","sources":["../../../src/common/errors/graphql-errors-handler-mappers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIhC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;CACzB;AAED,oBAAY,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,SAAS,CAAC;AAEtE,oBAAY,cAAc,GAAG,CAC3B,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,MAAM,KACZ,IAAI,CAAC;AAEV;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,eAkDlC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAmBnC,CAAC"}
1
+ {"version":3,"file":"graphql-errors-handler-mappers.d.ts","sourceRoot":"","sources":["../../../src/common/errors/graphql-errors-handler-mappers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAIhC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;CACzB;AAED,oBAAY,eAAe,GAAG,CAAC,KAAK,EAAE,KAAK,KAAK,SAAS,GAAG,SAAS,CAAC;AAEtE,oBAAY,cAAc,GAAG,CAC3B,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,KAAK,EACZ,MAAM,CAAC,EAAE,MAAM,KACZ,IAAI,CAAC;AAEV;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,eA8DlC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,cAmBnC,CAAC"}
@@ -46,6 +46,18 @@ const defaultPgErrorMapper = (error) => {
46
46
  message: originalError.message,
47
47
  code: error_code_1.ErrorCode.DatabaseValidationFailed,
48
48
  };
49
+ case pg_error_code_1.PgErrorCode.UserNotAuthorized: {
50
+ return {
51
+ message: originalError.message,
52
+ code: error_code_1.ErrorCode.UserNotAuthorized,
53
+ };
54
+ }
55
+ case pg_error_code_1.PgErrorCode.ExceptionRaisedError: {
56
+ return {
57
+ message: originalError.message,
58
+ code: error_code_1.ErrorCode.UnhandledDatabaseError,
59
+ };
60
+ }
49
61
  default:
50
62
  return {
51
63
  message: 'Unhandled database error has occurred.',
@@ -1 +1 @@
1
- {"version":3,"file":"graphql-errors-handler-mappers.js","sourceRoot":"","sources":["../../../src/common/errors/graphql-errors-handler-mappers.ts"],"names":[],"mappings":";;;AACA,wCAAgD;AAEhD,6CAAyC;AACzC,mDAA8C;AAmB9C;;GAEG;AACI,MAAM,oBAAoB,GAAoB,CACnD,KAAY,EACW,EAAE;;IACzB,MAAM,aAAa,GAAG,CAAC,MAAA,MAAC,KAAsB,0CAAE,aAAa,mCAC3D,KAAK,CAA6B,CAAC;IACrC,6GAA6G;IAC7G,qCAAqC;IACrC,uEAAuE;IACvE,IAAI,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,0CAAE,MAAM,MAAK,CAAC,EAAE;QACrC,OAAO,SAAS,CAAC;KAClB;IAED,QAAQ,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,EAAE;QAC3B,KAAK,2BAAW,CAAC,yBAAyB;YACxC,OAAO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,sBAAsB;YACnC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM;QAER,KAAK,sBAAS,CAAC,uBAAuB;YACpC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM;QAER;YACE,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACxB,MAAM;KACT;AACH,CAAC,CAAC;AAnBW,QAAA,qBAAqB,yBAmBhC"}
1
+ {"version":3,"file":"graphql-errors-handler-mappers.js","sourceRoot":"","sources":["../../../src/common/errors/graphql-errors-handler-mappers.ts"],"names":[],"mappings":";;;AACA,wCAAgD;AAEhD,6CAAyC;AACzC,mDAA8C;AAmB9C;;GAEG;AACI,MAAM,oBAAoB,GAAoB,CACnD,KAAY,EACW,EAAE;;IACzB,MAAM,aAAa,GAAG,CAAC,MAAA,MAAC,KAAsB,0CAAE,aAAa,mCAC3D,KAAK,CAA6B,CAAC;IACrC,6GAA6G;IAC7G,qCAAqC;IACrC,uEAAuE;IACvE,IAAI,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,0CAAE,MAAM,MAAK,CAAC,EAAE;QACrC,OAAO,SAAS,CAAC;KAClB;IAED,QAAQ,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,IAAI,EAAE;QAC3B,KAAK,2BAAW,CAAC,yBAAyB;YACxC,OAAO;gBACL,OAAO,EAAE,kDAAkD;gBAC3D,IAAI,EAAE,sBAAS,CAAC,wBAAwB;aACzC,CAAC;QACJ,KAAK,2BAAW,CAAC,yBAAyB;YACxC,OAAO;gBACL,OAAO,EACL,kFAAkF;gBACpF,IAAI,EAAE,sBAAS,CAAC,wBAAwB;aACzC,CAAC;QACJ,KAAK,2BAAW,CAAC,qBAAqB;YACpC,OAAO;gBACL,OAAO,EACL,kGAAkG;gBACpG,IAAI,EAAE,sBAAS,CAAC,wBAAwB;aACzC,CAAC;QACJ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AK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM;QAER,KAAK,sBAAS,CAAC,uBAAuB;YACpC,MAAM,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACzB,MAAM;QAER;YACE,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACxB,MAAM;KACT;AACH,CAAC,CAAC;AAnBW,QAAA,qBAAqB,yBAmBhC"}
@@ -19,6 +19,10 @@ export declare enum PgErrorCode {
19
19
  * Used to recognize an error that has happened because of a default constraint that checks if numeric value out of range.
20
20
  */
21
21
  NumericValueOutOfRange = "22003",
22
+ /**
23
+ * Used to recognize that a PL/pgSQL Error was raised.
24
+ */
25
+ ExceptionRaisedError = "P0001",
22
26
  /**
23
27
  * Used to recognize an error that has happened because of a custom constraint that checks if string is too long.
24
28
  */
@@ -54,6 +58,10 @@ export declare enum PgErrorCode {
54
58
  /**
55
59
  * Used to recognize an error that has happened because of a custom constraint that checks if string starts with specific characters.
56
60
  */
57
- StartsWithConstraintError = "STRWT"
61
+ StartsWithConstraintError = "STRWT",
62
+ /**
63
+ * Used to recognize an error that has happened because of missing permissions.
64
+ */
65
+ UserNotAuthorized = "PERMI"
58
66
  }
59
67
  //# sourceMappingURL=pg-error-code.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pg-error-code.d.ts","sourceRoot":"","sources":["../../../src/common/errors/pg-error-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,yBAAyB,UAAU;IACnC;;OAEG;IACH,qBAAqB,UAAU;IAC/B;;OAEG;IACH,yBAAyB,UAAU;IACnC;;OAEG;IACH,sBAAsB,UAAU;IAChC;;OAEG;IACH,wBAAwB,UAAU;IAClC;;OAEG;IACH,wBAAwB,UAAU;IAClC;;OAEG;IACH,kBAAkB,UAAU;IAC5B;;OAEG;IACH,kBAAkB,UAAU;IAC5B;;OAEG;IACH,gCAAgC,UAAU;IAC1C;;OAEG;IACH,qCAAqC,UAAU;IAC/C;;OAEG;IACH,8BAA8B,UAAU;IACxC;;OAEG;IACH,iCAAiC,UAAU;IAC3C;;OAEG;IACH,yBAAyB,UAAU;CACpC"}
1
+ {"version":3,"file":"pg-error-code.d.ts","sourceRoot":"","sources":["../../../src/common/errors/pg-error-code.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,WAAW;IACrB;;OAEG;IACH,yBAAyB,UAAU;IACnC;;OAEG;IACH,qBAAqB,UAAU;IAC/B;;OAEG;IACH,yBAAyB,UAAU;IACnC;;OAEG;IACH,sBAAsB,UAAU;IAChC;;OAEG;IACH,oBAAoB,UAAU;IAC9B;;OAEG;IACH,wBAAwB,UAAU;IAClC;;OAEG;IACH,wBAAwB,UAAU;IAClC;;OAEG;IACH,kBAAkB,UAAU;IAC5B;;OAEG;IACH,kBAAkB,UAAU;IAC5B;;OAEG;IACH,gCAAgC,UAAU;IAC1C;;OAEG;IACH,qCAAqC,UAAU;IAC/C;;OAEG;IACH,8BAA8B,UAAU;IACxC;;OAEG;IACH,iCAAiC,UAAU;IAC3C;;OAEG;IACH,yBAAyB,UAAU;IACnC;;OAEG;IACH,iBAAiB,UAAU;CAC5B"}
@@ -23,6 +23,10 @@ var PgErrorCode;
23
23
  * Used to recognize an error that has happened because of a default constraint that checks if numeric value out of range.
24
24
  */
25
25
  PgErrorCode["NumericValueOutOfRange"] = "22003";
26
+ /**
27
+ * Used to recognize that a PL/pgSQL Error was raised.
28
+ */
29
+ PgErrorCode["ExceptionRaisedError"] = "P0001";
26
30
  /**
27
31
  * Used to recognize an error that has happened because of a custom constraint that checks if string is too long.
28
32
  */
@@ -59,5 +63,9 @@ var PgErrorCode;
59
63
  * Used to recognize an error that has happened because of a custom constraint that checks if string starts with specific characters.
60
64
  */
61
65
  PgErrorCode["StartsWithConstraintError"] = "STRWT";
66
+ /**
67
+ * Used to recognize an error that has happened because of missing permissions.
68
+ */
69
+ PgErrorCode["UserNotAuthorized"] = "PERMI";
62
70
  })(PgErrorCode = exports.PgErrorCode || (exports.PgErrorCode = {}));
63
71
  //# sourceMappingURL=pg-error-code.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pg-error-code.js","sourceRoot":"","sources":["../../../src/common/errors/pg-error-code.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,WAqDX;AArDD,WAAY,WAAW;IACrB;;OAEG;IACH,kDAAmC,CAAA;IACnC;;OAEG;IACH,8CAA+B,CAAA;IAC/B;;OAEG;IACH,kDAAmC,CAAA;IACnC;;OAEG;IACH,+CAAgC,CAAA;IAChC;;OAEG;IACH,iDAAkC,CAAA;IAClC;;OAEG;IACH,iDAAkC,CAAA;IAClC;;OAEG;IACH,2CAA4B,CAAA;IAC5B;;OAEG;IACH,2CAA4B,CAAA;IAC5B;;OAEG;IACH,yDAA0C,CAAA;IAC1C;;OAEG;IACH,8DAA+C,CAAA;IAC/C;;OAEG;IACH,uDAAwC,CAAA;IACxC;;OAEG;IACH,0DAA2C,CAAA;IAC3C;;OAEG;IACH,kDAAmC,CAAA;AACrC,CAAC,EArDW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAqDtB"}
1
+ {"version":3,"file":"pg-error-code.js","sourceRoot":"","sources":["../../../src/common/errors/pg-error-code.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,IAAY,WA6DX;AA7DD,WAAY,WAAW;IACrB;;OAEG;IACH,kDAAmC,CAAA;IACnC;;OAEG;IACH,8CAA+B,CAAA;IAC/B;;OAEG;IACH,kDAAmC,CAAA;IACnC;;OAEG;IACH,+CAAgC,CAAA;IAChC;;OAEG;IACH,6CAA8B,CAAA;IAC9B;;OAEG;IACH,iDAAkC,CAAA;IAClC;;OAEG;IACH,iDAAkC,CAAA;IAClC;;OAEG;IACH,2CAA4B,CAAA;IAC5B;;OAEG;IACH,2CAA4B,CAAA;IAC5B;;OAEG;IACH,yDAA0C,CAAA;IAC1C;;OAEG;IACH,8DAA+C,CAAA;IAC/C;;OAEG;IACH,uDAAwC,CAAA;IACxC;;OAEG;IACH,0DAA2C,CAAA;IAC3C;;OAEG;IACH,kDAAmC,CAAA;IACnC;;OAEG;IACH,0CAA2B,CAAA;AAC7B,CAAC,EA7DW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QA6DtB"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Based on:
3
+ *
4
+ * https://gist.github.com/bkeating/cfe0d5e72bd3f9f1f77e1a2ff2309972
5
+ *
6
+ * with some additions for the PostGraphiQL extension.
7
+ */
8
+ import { PostGraphilePlugin } from 'postgraphile';
9
+ /**
10
+ * This plugin override changes the branding piece of graphiql.
11
+ */
12
+ export declare const GraphiqlDarkModePluginHook: PostGraphilePlugin;
13
+ //# sourceMappingURL=graphiql-dark-mode-plugin-hook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphiql-dark-mode-plugin-hook.d.ts","sourceRoot":"","sources":["../../src/plugins/graphiql-dark-mode-plugin-hook.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,kBAkNxC,CAAC"}
@@ -0,0 +1,222 @@
1
+ "use strict";
2
+ /**
3
+ * Based on:
4
+ *
5
+ * https://gist.github.com/bkeating/cfe0d5e72bd3f9f1f77e1a2ff2309972
6
+ *
7
+ * with some additions for the PostGraphiQL extension.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.GraphiqlDarkModePluginHook = void 0;
11
+ /**
12
+ * This plugin override changes the branding piece of graphiql.
13
+ */
14
+ exports.GraphiqlDarkModePluginHook = {
15
+ ['postgraphile:graphiql:html'](html) {
16
+ return html.replace('</head>', `
17
+ <style>
18
+ /* GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating[1]
19
+ * Colors taken from Atom's One Dark theme[2]. Add this file to the end of
20
+ * your <head> block[3] to override built-in default styling.
21
+ *
22
+ * [1]. https://twitter.com/flowpoke
23
+ * [2]. https://github.com/atom/atom/tree/master/packages/one-dark-ui
24
+ * [3]. e.g. \`.../site-packages/graphene_django/templates/graphene/graphiql.html\`
25
+ */
26
+ .CodeMirror {
27
+ background: #282D34 !important;
28
+ }
29
+ .graphiql-container .doc-explorer-contents, .graphiql-container .history-contents {
30
+ background-color: #21262B !important;
31
+ border-top: 1px solid #181A1F !important;
32
+ }
33
+ .graphiql-container .toolbar-button {
34
+ background: #1c2125 !important;
35
+ box-shadow: none !important;
36
+ color: #5c626d !important;
37
+ border: 1px solid #181a1f !important;
38
+ }
39
+ .graphiql-container .result-window .CodeMirror-gutters {
40
+ background: #282D33 !important;
41
+ border: none !important;
42
+ }
43
+ .graphiql-container .resultWrap {
44
+ border-left: solid 1px #181a1f !important;
45
+ }
46
+ .graphiql-container .variable-editor-title {
47
+ background: #21262b !important;
48
+ border-bottom: 1px solid #181a1f !important;
49
+ border-top: 1px solid #181a1f !important;
50
+ color: #cacdd3 !important;
51
+ }
52
+ .graphiql-container .topBar {
53
+ background: #21262B !important;
54
+ border-color: #181A1F !important;
55
+ }
56
+ .graphiql-container .docExplorerHide {
57
+ color: #606671 !important;
58
+ }
59
+ .graphiql-container .doc-explorer-title, .graphiql-container .history-title, .doc-explorer-back {
60
+ color: #CACDD3 !important;
61
+ }
62
+ .graphiql-container .doc-explorer {
63
+ background: #21262b !important;
64
+ }
65
+ .graphiql-container .docExplorerWrap, .graphiql-container .historyPaneWrap {
66
+ box-shadow: none;
67
+ }
68
+ .graphiql-container .docExplorerShow {
69
+ border-left: none;
70
+ }
71
+ .graphiql-container .docExplorerShow, .graphiql-container .historyShow {
72
+ background: #21262b !important;
73
+ border-bottom: 1px solid #181A1E !important;
74
+ color: #CACDD3 !important;
75
+ }
76
+ .graphiql-container .docExplorerShow:before, .graphiql-container .doc-explorer-back:before {
77
+ border-color: #CACDD3 !important;
78
+ }
79
+ .graphiql-container .search-box {
80
+ margin: auto auto 10px auto;
81
+ border: none;
82
+ }
83
+ .graphiql-container .search-box input {
84
+ background: #1E2127 !important;
85
+ padding-left: 28px;
86
+ }
87
+ .graphiql-container .search-box .search-box-clear,
88
+ .graphiql-container .search-box .search-box-clear:hover {
89
+ background: #1d2126 !important;
90
+ }
91
+ .graphiql-container .search-box:before {
92
+ color: #c1c4ca !important;
93
+ font-size: 21px;
94
+ left: 8px;
95
+ }
96
+ .graphiql-container, .graphiql-container button, .graphiql-container input {
97
+ color: #9299A7 !important;
98
+ }
99
+ .CodeMirror-gutters {
100
+ border: none !important;
101
+ background-color: #282d33 !important;
102
+ }
103
+ .graphiql-container .execute-button {
104
+ background: #21262b !important;
105
+ border: 1px solid rgb(91, 98, 107) !important;
106
+ box-shadow: none !important;
107
+ fill: #c9ccd2 !important;
108
+ }
109
+ .graphiql-container .history-contents p {
110
+ border: none;
111
+ }
112
+ .graphiql-container .historyPaneWrap {
113
+ background: #21262b !important;
114
+ }
115
+ .graphiql-container .execute-options > li.selected, .graphiql-container .toolbar-menu-items > li.hover, .graphiql-container .toolbar-menu-items > li:active, .graphiql-container .toolbar-menu-items > li:hover, .graphiql-container .toolbar-select-options > li.hover, .graphiql-container .toolbar-select-options > li:active, .graphiql-container .toolbar-select-options > li:hover, .graphiql-container .history-contents > p:hover, .graphiql-container .history-contents > p:active {
116
+ background: #383C41 !important;
117
+ }
118
+ .graphiql-container .doc-category-title {
119
+ border-bottom: 1px solid #181a1f !important;
120
+ color: #cacdd3 !important;
121
+ }
122
+ .graphiql-container .field-name {
123
+ color: #9CA3AC !important;
124
+ }
125
+ .graphiql-container .type-name {
126
+ color: #95be76 !important;
127
+ }
128
+ .cm-property {
129
+ color: #A5ACB8 !important;
130
+ }
131
+ .cm-string {
132
+ color: #97BE7B !important;
133
+ }
134
+ .cm-variable {
135
+ color: #a87f5b !important;
136
+ }
137
+ .cm-attribute {
138
+ color: #B58860 !important;
139
+ }
140
+ .cm-def {
141
+ color: #CC3932 !important;
142
+ }
143
+ .cm-keyword {
144
+ color: #7cf3ff !important;
145
+ }
146
+ .graphiql-container .keyword {
147
+ color: #9ea5b0 !important;
148
+ }
149
+ .graphiql-container .arg-name {
150
+ color: #b5875d !important;
151
+ }
152
+ .graphiql-container .doc-category-item {
153
+ color: #BC6069 !important;
154
+ }
155
+ a {
156
+ color: #7b9ad4 !important;
157
+ }
158
+ .CodeMirror-lint-tooltip {
159
+ background: #1a1e22 !important;
160
+ color: red !important;
161
+ }
162
+ .cm-atom {
163
+ color: #d27caf !important;
164
+ }
165
+ .CodeMirror-hints {
166
+ background: #21262a !important;
167
+ box-shadow: 0 16px 13px -10px rgba(0, 0, 0, 0.3) !important;
168
+ }
169
+ .CodeMirror-hint {
170
+ border-top: solid 1px #212629 !important;
171
+ color: #8ab16f !important;
172
+ }
173
+ .CodeMirror-hint-information {
174
+ border-top: solid 1px #181a1e !important;
175
+ }
176
+ li.CodeMirror-hint-active {
177
+ background-color: #262c2f !important;
178
+ border-top-color: #212629 !important;
179
+ color: #b8ff87 !important;
180
+ }
181
+ .CodeMirror-hint-information .content {
182
+ color: #a4abb7 !important;
183
+ }
184
+ .postgraphile-footer {
185
+ background: #21262B !important;
186
+ border-left: 1px solid #212629 !important;
187
+ border-top: 1px solid #212629 !important;
188
+ }
189
+ .doc-explorer-title-bar {
190
+ background: #21262b !important;
191
+ color: #CACDD3 !important;
192
+ }
193
+ select {
194
+ background: #212633 !important;
195
+ color: #d8dadf !important;
196
+ }
197
+ .graphiql-operation-title-bar input, .graphiql-explorer-graphql-arguments input {
198
+ background: #212633 !important;
199
+ color: #d8dadf !important;
200
+ }
201
+ .graphiql-container .footer:before {
202
+ background: #1C2123 !important;
203
+ }
204
+ .graphiql-container .footer {
205
+ border-left: 1px solid #181a1f !important;
206
+ border-top: 1px solid #181a1f !important;
207
+ }
208
+ .graphiql-container .doc-category code, .graphiql-container .doc-type-description code {
209
+ background: #383C41 !important;
210
+ }
211
+ .cm-ws {
212
+ color: #A5ACB8 !important;
213
+ }
214
+ .CodeMirror-cursor {
215
+ border-color: #638AEB !important;
216
+ }
217
+ </style>
218
+ </head>
219
+ `);
220
+ },
221
+ };
222
+ //# sourceMappingURL=graphiql-dark-mode-plugin-hook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphiql-dark-mode-plugin-hook.js","sourceRoot":"","sources":["../../src/plugins/graphiql-dark-mode-plugin-hook.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;AAIH;;GAEG;AACU,QAAA,0BAA0B,GAAuB;IAC5D,CAAC,4BAA4B,CAAC,CAAC,IAAY;QACzC,OAAO,IAAI,CAAC,OAAO,CACjB,SAAS,EACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2ME,CACH,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export * from './annotate-types-with-permissions.plugin';
2
2
  export * from './generic-bulk-plugin-factory';
3
+ export * from './graphiql-dark-mode-plugin-hook';
3
4
  export * from './operations-enum-generator-plugin-factory';
4
5
  export * from './subscriptions-plugin.factory';
5
6
  export * from './validation-directives.plugin';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAC;AACzD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC"}
@@ -12,6 +12,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./annotate-types-with-permissions.plugin"), exports);
14
14
  __exportStar(require("./generic-bulk-plugin-factory"), exports);
15
+ __exportStar(require("./graphiql-dark-mode-plugin-hook"), exports);
15
16
  __exportStar(require("./operations-enum-generator-plugin-factory"), exports);
16
17
  __exportStar(require("./subscriptions-plugin.factory"), exports);
17
18
  __exportStar(require("./validation-directives.plugin"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAyD;AACzD,gEAA8C;AAC9C,6EAA2D;AAC3D,iEAA+C;AAC/C,iEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/plugins/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2EAAyD;AACzD,gEAA8C;AAC9C,mEAAiD;AACjD,6EAA2D;AAC3D,iEAA+C;AAC/C,iEAA+C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-service-common",
3
- "version": "0.9.0",
3
+ "version": "0.10.0-rc.3",
4
4
  "description": "Common helpers and PostgreSQL-related functionality",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "9ae48a617c4a8214f186463423b56678ffd98f94"
65
+ "gitHead": "30a5cceacde15746fcf22502f57c22c2f13643ea"
66
66
  }