@common-stack/server-stack 8.0.2-alpha.0 → 8.2.1-alpha.1

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.
Files changed (147) hide show
  1. package/LICENSE +34 -21
  2. package/lib/MainStackServer.cjs +126 -146
  3. package/lib/MainStackServer.cjs.map +1 -1
  4. package/lib/MainStackServer.d.ts +12 -6
  5. package/lib/MainStackServer.mjs +126 -146
  6. package/lib/MainStackServer.mjs.map +1 -1
  7. package/lib/StackServer.cjs +23 -66
  8. package/lib/StackServer.cjs.map +1 -1
  9. package/lib/StackServer.d.ts +4 -5
  10. package/lib/StackServer.mjs +23 -66
  11. package/lib/StackServer.mjs.map +1 -1
  12. package/lib/api/schema-builder.cjs +13 -12
  13. package/lib/api/schema-builder.cjs.map +1 -1
  14. package/lib/api/schema-builder.mjs +13 -12
  15. package/lib/api/schema-builder.mjs.map +1 -1
  16. package/lib/api/sub-graph-schema-builder.cjs +147 -0
  17. package/lib/api/sub-graph-schema-builder.cjs.map +1 -0
  18. package/lib/api/sub-graph-schema-builder.d.ts +24 -0
  19. package/lib/api/sub-graph-schema-builder.mjs +147 -0
  20. package/lib/api/sub-graph-schema-builder.mjs.map +1 -0
  21. package/lib/config/env-config.cjs +6 -0
  22. package/lib/config/env-config.cjs.map +1 -1
  23. package/lib/config/env-config.d.ts +6 -0
  24. package/lib/config/env-config.mjs +6 -0
  25. package/lib/config/env-config.mjs.map +1 -1
  26. package/lib/examples/tenant-feature-example.d.ts +13 -0
  27. package/lib/examples/tenant-feature-integration.d.ts +14 -0
  28. package/lib/features/multi-module-example.d.ts +17 -0
  29. package/lib/index.cjs +1 -1
  30. package/lib/index.d.ts +1 -0
  31. package/lib/index.mjs +1 -1
  32. package/lib/infrastructure/container-module.cjs +27 -0
  33. package/lib/infrastructure/container-module.cjs.map +1 -0
  34. package/lib/infrastructure/container-module.d.ts +3 -0
  35. package/lib/infrastructure/container-module.mjs +27 -0
  36. package/lib/infrastructure/container-module.mjs.map +1 -0
  37. package/lib/infrastructure/example-workflows.d.ts +16 -0
  38. package/lib/infrastructure/index.d.ts +5 -0
  39. package/lib/infrastructure/infrastructure-factory.cjs +172 -0
  40. package/lib/infrastructure/infrastructure-factory.cjs.map +1 -0
  41. package/lib/infrastructure/infrastructure-factory.d.ts +36 -0
  42. package/lib/infrastructure/infrastructure-factory.mjs +172 -0
  43. package/lib/infrastructure/infrastructure-factory.mjs.map +1 -0
  44. package/lib/infrastructure/inngest-factory.cjs +47 -0
  45. package/lib/infrastructure/inngest-factory.cjs.map +1 -0
  46. package/lib/infrastructure/inngest-factory.d.ts +8 -0
  47. package/lib/infrastructure/inngest-factory.mjs +47 -0
  48. package/lib/infrastructure/inngest-factory.mjs.map +1 -0
  49. package/lib/infrastructure/types.d.ts +28 -0
  50. package/lib/infrastructure/usage-examples.d.ts +9 -0
  51. package/lib/infrastructure/workflow-orchestrator.cjs +59 -0
  52. package/lib/infrastructure/workflow-orchestrator.cjs.map +1 -0
  53. package/lib/infrastructure/workflow-orchestrator.d.ts +10 -0
  54. package/lib/infrastructure/workflow-orchestrator.mjs +59 -0
  55. package/lib/infrastructure/workflow-orchestrator.mjs.map +1 -0
  56. package/lib/inngest/client-id-generator.d.ts +29 -0
  57. package/lib/inngest/handler-factory.d.ts +24 -0
  58. package/lib/inngest/middleware/auto-resolve-invoke.middleware.cjs +275 -0
  59. package/lib/inngest/middleware/auto-resolve-invoke.middleware.cjs.map +1 -0
  60. package/lib/inngest/middleware/auto-resolve-invoke.middleware.d.ts +111 -0
  61. package/lib/inngest/middleware/auto-resolve-invoke.middleware.mjs +275 -0
  62. package/lib/inngest/middleware/auto-resolve-invoke.middleware.mjs.map +1 -0
  63. package/lib/inngest/middleware/function-reference-helper.cjs +363 -0
  64. package/lib/inngest/middleware/function-reference-helper.cjs.map +1 -0
  65. package/lib/inngest/middleware/function-reference-helper.d.ts +211 -0
  66. package/lib/inngest/middleware/function-reference-helper.mjs +363 -0
  67. package/lib/inngest/middleware/function-reference-helper.mjs.map +1 -0
  68. package/lib/inngest/middleware/index.d.ts +31 -0
  69. package/lib/inngest/middleware/types.d.ts +162 -0
  70. package/lib/inngest/multi-module-functions.d.ts +133 -0
  71. package/lib/inngest/setup.cjs +55 -0
  72. package/lib/inngest/setup.cjs.map +1 -0
  73. package/lib/inngest/setup.d.ts +10 -0
  74. package/lib/inngest/setup.mjs +55 -0
  75. package/lib/inngest/setup.mjs.map +1 -0
  76. package/lib/interfaces/graphql-request-context.d.ts +5 -0
  77. package/lib/middleware/index.d.ts +5 -0
  78. package/lib/middleware/redis-client.cjs +18 -0
  79. package/lib/middleware/redis-client.cjs.map +1 -0
  80. package/lib/middleware/redis-client.d.ts +16 -0
  81. package/lib/middleware/redis-client.mjs +18 -0
  82. package/lib/middleware/redis-client.mjs.map +1 -0
  83. package/lib/plugins/responseCachePlugin.cjs +2 -2
  84. package/lib/plugins/responseCachePlugin.cjs.map +1 -1
  85. package/lib/plugins/responseCachePlugin.mjs +2 -2
  86. package/lib/plugins/responseCachePlugin.mjs.map +1 -1
  87. package/lib/servers/ExpressApp.cjs +8 -3
  88. package/lib/servers/ExpressApp.cjs.map +1 -1
  89. package/lib/servers/ExpressApp.d.ts +1 -1
  90. package/lib/servers/ExpressApp.mjs +8 -3
  91. package/lib/servers/ExpressApp.mjs.map +1 -1
  92. package/lib/servers/GraphqlServer.cjs +7 -2
  93. package/lib/servers/GraphqlServer.cjs.map +1 -1
  94. package/lib/servers/GraphqlServer.d.ts +8 -6
  95. package/lib/servers/GraphqlServer.mjs +7 -2
  96. package/lib/servers/GraphqlServer.mjs.map +1 -1
  97. package/lib/servers/GraphqlWs.cjs +3 -44
  98. package/lib/servers/GraphqlWs.cjs.map +1 -1
  99. package/lib/servers/GraphqlWs.mjs +3 -44
  100. package/lib/servers/GraphqlWs.mjs.map +1 -1
  101. package/lib/servers/WebsocketMultipathUpdate.cjs +4 -2
  102. package/lib/servers/WebsocketMultipathUpdate.cjs.map +1 -1
  103. package/lib/servers/WebsocketMultipathUpdate.mjs +4 -2
  104. package/lib/servers/WebsocketMultipathUpdate.mjs.map +1 -1
  105. package/lib/servers/mongodb-migration-update.d.ts +1 -1
  106. package/lib/servers/websocket-context.cjs +70 -0
  107. package/lib/servers/websocket-context.cjs.map +1 -0
  108. package/lib/servers/websocket-context.d.ts +30 -0
  109. package/lib/servers/websocket-context.mjs +70 -0
  110. package/lib/servers/websocket-context.mjs.map +1 -0
  111. package/lib/utils/add-shareable-directive-to-schema.cjs +44 -0
  112. package/lib/utils/add-shareable-directive-to-schema.cjs.map +1 -0
  113. package/lib/utils/add-shareable-directive-to-schema.d.ts +1 -0
  114. package/lib/utils/add-shareable-directive-to-schema.mjs +44 -0
  115. package/lib/utils/add-shareable-directive-to-schema.mjs.map +1 -0
  116. package/lib/utils/index.d.ts +2 -0
  117. package/lib/utils/safe-model-factory.d.ts +18 -0
  118. package/package.json +15 -11
  119. package/lib/api/resolver.cjs +0 -12
  120. package/lib/api/resolver.cjs.map +0 -1
  121. package/lib/api/resolver.mjs +0 -12
  122. package/lib/api/resolver.mjs.map +0 -1
  123. package/lib/api/root-schema.graphqls.cjs +0 -2
  124. package/lib/api/root-schema.graphqls.cjs.map +0 -1
  125. package/lib/api/root-schema.graphqls.mjs +0 -2
  126. package/lib/api/root-schema.graphqls.mjs.map +0 -1
  127. package/lib/api/scalar.cjs +0 -16
  128. package/lib/api/scalar.cjs.map +0 -1
  129. package/lib/api/scalar.mjs +0 -16
  130. package/lib/api/scalar.mjs.map +0 -1
  131. package/lib/graphql/directives/index.cjs +0 -10
  132. package/lib/graphql/directives/index.cjs.map +0 -1
  133. package/lib/graphql/directives/index.d.ts +0 -7
  134. package/lib/graphql/directives/index.mjs +0 -10
  135. package/lib/graphql/directives/index.mjs.map +0 -1
  136. package/lib/graphql/index.d.ts +0 -2
  137. package/lib/graphql/schema/directives.graphql.cjs +0 -1
  138. package/lib/graphql/schema/directives.graphql.cjs.map +0 -1
  139. package/lib/graphql/schema/directives.graphql.mjs +0 -1
  140. package/lib/graphql/schema/directives.graphql.mjs.map +0 -1
  141. package/lib/graphql/schema/index.cjs +0 -1
  142. package/lib/graphql/schema/index.cjs.map +0 -1
  143. package/lib/graphql/schema/index.d.ts +0 -1
  144. package/lib/graphql/schema/index.mjs +0 -1
  145. package/lib/graphql/schema/index.mjs.map +0 -1
  146. package/lib/plugins/invalidateCachePlugin.test.d.ts +0 -1
  147. package/lib/plugins/response-cache-plugin.test.d.ts +0 -1
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@common-stack/server-stack",
3
- "version": "8.0.2-alpha.0",
3
+ "version": "8.2.1-alpha.1",
4
4
  "description": "common core for higher packages to depend on",
5
- "license": "ISC",
5
+ "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
7
7
  "main": "lib/index.mjs",
8
8
  "module": "lib/index.mjs",
@@ -26,16 +26,14 @@
26
26
  "@apollo/datasource-rest": "^6.3.0",
27
27
  "@apollo/server": "^4.10.4",
28
28
  "@apollo/server-plugin-response-cache": "^4.1.3",
29
+ "@apollo/subgraph": "^2.7.1",
29
30
  "@apollo/utils.keyvadapter": "^3.1.0",
30
31
  "@casl/ability": "^4.1.5",
31
- "@cdm-logger/client": "^9.0.3",
32
- "@cdm-logger/server": "^9.0.3",
32
+ "@cdm-logger/client": "^9.0.8",
33
+ "@cdm-logger/server": "^9.0.15",
33
34
  "@cdmbase/graphql-type-uri": "^4.0.0",
34
- "@common-stack/cache-api-server": "8.0.2-alpha.0",
35
- "@common-stack/client-core": "8.0.2-alpha.0",
36
- "@common-stack/core": "8.0.2-alpha.0",
37
- "@common-stack/server-core": "8.0.2-alpha.0",
38
- "@common-stack/store-mongo": "8.0.2-alpha.0",
35
+ "@common-stack/codegen-zod": "8.2.1-alpha.0",
36
+ "@common-stack/graphql-api": "8.2.1-alpha.1",
39
37
  "@graphql-tools/links": "~9.0.1",
40
38
  "@graphql-tools/schema": "~10.0.6",
41
39
  "@graphql-tools/stitch": "~9.2.10",
@@ -64,6 +62,7 @@
64
62
  "graphql-tools": "~9.0.0",
65
63
  "graphql-type-json": "^0.3.1",
66
64
  "graphql-ws": "^5.11.2",
65
+ "inngest": "^3.32.5",
67
66
  "inversify": "~6.0.2",
68
67
  "ioredis": "^5.4.1",
69
68
  "isomorphic-fetch": "^2.2.1",
@@ -78,7 +77,12 @@
78
77
  "rxjs": "^7.8.1",
79
78
  "subscriptions-transport-ws": "^0.11.0",
80
79
  "universal-cookie-express": "^4.0.1",
81
- "ws": "^8.11.0"
80
+ "ws": "^8.11.0",
81
+ "zod": "^4.0.0"
82
+ },
83
+ "devDependencies": {
84
+ "@common-stack/server-core": "8.2.1-alpha.1",
85
+ "common": "8.2.1-alpha.0"
82
86
  },
83
87
  "peerDependencies": {
84
88
  "@cdm-logger/core": ">=7.0.12",
@@ -91,5 +95,5 @@
91
95
  "typescript": {
92
96
  "definition": "lib/index.d.ts"
93
97
  },
94
- "gitHead": "d45864ba7429065d7b67e573e909ecf762ffc150"
98
+ "gitHead": "b2d399cf0e4ebf83d34b098f8244e69157cef55c"
95
99
  }
@@ -1,12 +0,0 @@
1
- 'use strict';var GraphQLJSON=require('graphql-type-json'),graphqlScalars=require('graphql-scalars'),GraphQLURISource=require('@cdmbase/graphql-type-uri'),scalar=require('./scalar.cjs');/* eslint-disable import/no-extraneous-dependencies */
2
- const GraphQLURI = GraphQLURISource.default ?? GraphQLURISource;
3
- const resolvers = {
4
- AnyObject: scalar.GraphQLAnyObject,
5
- Date: graphqlScalars.GraphQLDate,
6
- Time: graphqlScalars.GraphQLTime,
7
- URI: GraphQLURI('URI'),
8
- URIInput: GraphQLURI('URIInput'),
9
- DateTime: graphqlScalars.GraphQLDateTime,
10
- JSON: GraphQLJSON,
11
- JSONObject: GraphQLJSON.GraphQLJSONObject,
12
- };exports.resolvers=resolvers;//# sourceMappingURL=resolver.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolver.cjs","sources":["../../src/api/resolver.ts"],"sourcesContent":[null],"names":["GraphQLAnyObject","GraphQLDate","GraphQLTime","GraphQLDateTime","GraphQLJSONObject"],"mappings":"yLAAA;AAMA,MAAM,UAAU,GAAI,gBAAwB,CAAC,OAAO,IAAI,gBAAgB,CAAC;AAC5D,MAAA,SAAS,GAAG;AACrB,IAAA,SAAS,EAAEA,uBAAgB;AAC3B,IAAA,IAAI,EAAEC,0BAAW;AACjB,IAAA,IAAI,EAAEC,0BAAW;AACjB,IAAA,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC;AACtB,IAAA,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;AAChC,IAAA,QAAQ,EAAEC,8BAAe;AACzB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,UAAU,EAAEC,6BAAiB;"}
@@ -1,12 +0,0 @@
1
- import GraphQLJSON,{GraphQLJSONObject}from'graphql-type-json';import {GraphQLDate,GraphQLTime,GraphQLDateTime}from'graphql-scalars';import GraphQLURISource from'@cdmbase/graphql-type-uri';import {GraphQLAnyObject}from'./scalar.mjs';/* eslint-disable import/no-extraneous-dependencies */
2
- const GraphQLURI = GraphQLURISource.default ?? GraphQLURISource;
3
- const resolvers = {
4
- AnyObject: GraphQLAnyObject,
5
- Date: GraphQLDate,
6
- Time: GraphQLTime,
7
- URI: GraphQLURI('URI'),
8
- URIInput: GraphQLURI('URIInput'),
9
- DateTime: GraphQLDateTime,
10
- JSON: GraphQLJSON,
11
- JSONObject: GraphQLJSONObject,
12
- };export{resolvers};//# sourceMappingURL=resolver.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolver.mjs","sources":["../../src/api/resolver.ts"],"sourcesContent":[null],"names":[],"mappings":"wOAAA;AAMA,MAAM,UAAU,GAAI,gBAAwB,CAAC,OAAO,IAAI,gBAAgB,CAAC;AAC5D,MAAA,SAAS,GAAG;AACrB,IAAA,SAAS,EAAE,gBAAgB;AAC3B,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,GAAG,EAAE,UAAU,CAAC,KAAK,CAAC;AACtB,IAAA,QAAQ,EAAE,UAAU,CAAC,UAAU,CAAC;AAChC,IAAA,QAAQ,EAAE,eAAe;AACzB,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,UAAU,EAAE,iBAAiB;"}
@@ -1,2 +0,0 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var rootSchemaDef = "scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\ninterface IResourceUtilizationSettings {\n subTopic: String\n adminApiNamespace: String\n}\n\n\"\"\"\nTo calculate geometry over an Eath-like sphere.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ntype GeoLocation {\n coordinates: [Float]\n}\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\nenum MailTemplateId {\n dummy\n}\n\nenum MoleculerCronServiceName {\n dummy\n}\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n";
2
- exports.default=rootSchemaDef;//# sourceMappingURL=root-schema.graphqls.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root-schema.graphqls.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,2 +0,0 @@
1
- var rootSchemaDef = "scalar AnyObject\nscalar Date\nscalar Time\nscalar DateTime\nscalar Timestamp\nscalar URI\nscalar URIInput\nscalar Observable\nscalar JSON\nscalar JSONObject\n\n\"\"\"\n An object with an ID.\n\"\"\"\ninterface Node {\n \"\"\"\n The ID of the node.\n \"\"\"\n id: ID!\n}\n\n# Pagination information. See https://facebook.github.io/relay/graphql/connections.htm#sec-undefined.PageInfo.\ntype PageInfo {\n # Whether there is a next page of nodes in the connection.\n hasNextPage: Boolean!\n}\n\n\"\"\"\n Represents a null return value.\n\"\"\"\ntype EmptyResponse {\n # A dummy null value.\n alwaysNil: String\n}\n\ntype FieldError {\n field: String!\n message: String!\n}\n\ninput Sort{\n key: String!,\n value: SortEnum!,\n}\n\nenum SortEnum{\n ASC\n DESC\n}\n\ntype Query {\n \"\"\"\n Looks up a node by ID.\n \"\"\"\n node(id: ID!): Node\n\n}\n\ntype Mutation {\n dummy: Int\n}\n\ntype Subscription {\n dummy: Int\n}\n\n\ntype AdminIdeSettings {\n dummy: Int\n}\n\n\"\"\" All Moleculer Topic names are extended from this.\"\"\"\nenum MoleculerServiceName {\n dummy\n}\n\ninterface IResourceUtilizationSettings {\n subTopic: String\n adminApiNamespace: String\n}\n\n\"\"\"\nTo calculate geometry over an Eath-like sphere.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ntype GeoLocation {\n coordinates: [Float]\n}\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\n\"\"\"\nInput geometry of the location.\nList the `longitude` first and then `latitude`\n - Validate longitude values are between `-180` and `180`\n - Validate latitude values are between `-90` and `90`\n\"\"\"\ninput GeoLocationInput {\n type: String = \"Point\"\n coordinates: [Float]\n}\n\nenum MailTemplateId {\n dummy\n}\n\nenum MoleculerCronServiceName {\n dummy\n}\n\nschema {\n query: Query\n mutation: Mutation\n subscription: Subscription\n}\n\n";
2
- export{rootSchemaDef as default};//# sourceMappingURL=root-schema.graphqls.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"root-schema.graphqls.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,16 +0,0 @@
1
- 'use strict';var graphql=require('graphql');// add any scalar types
2
- // https://stackoverflow.com/questions/41557536/custom-map-keys-in-graphql-response
3
- const GraphQLAnyObject = new graphql.GraphQLScalarType({
4
- name: 'AnyObject',
5
- description: 'Any JSON object. This type bypasses type checking.',
6
- serialize: (value) => value,
7
- parseValue: (value) => value,
8
- parseLiteral: (ast) => {
9
- if (ast.kind !== graphql.Kind.OBJECT) {
10
- throw new graphql.GraphQLError(`Query error: Can only parse object but got a: ${ast.kind}`, {
11
- nodes: [ast],
12
- });
13
- }
14
- return ast.fields;
15
- },
16
- });exports.GraphQLAnyObject=GraphQLAnyObject;//# sourceMappingURL=scalar.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scalar.cjs","sources":["../../src/api/scalar.ts"],"sourcesContent":[null],"names":["GraphQLScalarType","Kind","GraphQLError"],"mappings":"4CAAA;AAGA;AACa,MAAA,gBAAgB,GAAG,IAAIA,yBAAiB,CAAC;AAClD,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,WAAW,EAAE,oDAAoD;AACjE,IAAA,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK;AAC3B,IAAA,UAAU,EAAE,CAAC,KAAK,KAAK,KAAK;AAC5B,IAAA,YAAY,EAAE,CAAC,GAAG,KAAI;QAClB,IAAI,GAAG,CAAC,IAAI,KAAKC,YAAI,CAAC,MAAM,EAAE;YAC1B,MAAM,IAAIC,oBAAY,CAAC,CAAA,8CAAA,EAAiD,GAAG,CAAC,IAAI,EAAE,EAAE;gBAChF,KAAK,EAAE,CAAC,GAAG,CAAC;AACf,aAAA,CAAC,CAAC;SACN;QACD,OAAO,GAAG,CAAC,MAAM,CAAC;KACrB;AACJ,CAAA"}
@@ -1,16 +0,0 @@
1
- import {GraphQLScalarType,Kind,GraphQLError}from'graphql';// add any scalar types
2
- // https://stackoverflow.com/questions/41557536/custom-map-keys-in-graphql-response
3
- const GraphQLAnyObject = new GraphQLScalarType({
4
- name: 'AnyObject',
5
- description: 'Any JSON object. This type bypasses type checking.',
6
- serialize: (value) => value,
7
- parseValue: (value) => value,
8
- parseLiteral: (ast) => {
9
- if (ast.kind !== Kind.OBJECT) {
10
- throw new GraphQLError(`Query error: Can only parse object but got a: ${ast.kind}`, {
11
- nodes: [ast],
12
- });
13
- }
14
- return ast.fields;
15
- },
16
- });export{GraphQLAnyObject};//# sourceMappingURL=scalar.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scalar.mjs","sources":["../../src/api/scalar.ts"],"sourcesContent":[null],"names":[],"mappings":"0DAAA;AAGA;AACa,MAAA,gBAAgB,GAAG,IAAI,iBAAiB,CAAC;AAClD,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,WAAW,EAAE,oDAAoD;AACjE,IAAA,SAAS,EAAE,CAAC,KAAK,KAAK,KAAK;AAC3B,IAAA,UAAU,EAAE,CAAC,KAAK,KAAK,KAAK;AAC5B,IAAA,YAAY,EAAE,CAAC,GAAG,KAAI;QAClB,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,MAAM,EAAE;YAC1B,MAAM,IAAI,YAAY,CAAC,CAAA,8CAAA,EAAiD,GAAG,CAAC,IAAI,EAAE,EAAE;gBAChF,KAAK,EAAE,CAAC,GAAG,CAAC;AACf,aAAA,CAAC,CAAC;SACN;QACD,OAAO,GAAG,CAAC,MAAM,CAAC;KACrB;AACJ,CAAA"}
@@ -1,10 +0,0 @@
1
- 'use strict';const serverDirectives = (_) => ({
2
- invalidateCache(next, source, { queries }, context) {
3
- context.queriesToInvalidate = queries;
4
- return next();
5
- },
6
- cacheControl(next, source, args, context) {
7
- context.overallCachePolicy = args;
8
- return next();
9
- },
10
- });exports.serverDirectives=serverDirectives;//# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/graphql/directives/index.ts"],"sourcesContent":[null],"names":[],"mappings":"mBAEa,gBAAgB,GAAG,CAAC,CAAoB,MAAM;IACvD,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAA;AAC9C,QAAA,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC;QACtC,OAAO,IAAI,EAAE,CAAC;KACjB;AACD,IAAA,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAA;AACpC,QAAA,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAClC,OAAO,IAAI,EAAE,CAAC;KACjB;AACJ,CAAA"}
@@ -1,7 +0,0 @@
1
- import { IDirectiveOptions } from '@common-stack/server-core';
2
- export declare const serverDirectives: (_: IDirectiveOptions) => {
3
- invalidateCache(next: any, source: any, { queries }: {
4
- queries: any;
5
- }, context: any): any;
6
- cacheControl(next: any, source: any, args: any, context: any): any;
7
- };
@@ -1,10 +0,0 @@
1
- const serverDirectives = (_) => ({
2
- invalidateCache(next, source, { queries }, context) {
3
- context.queriesToInvalidate = queries;
4
- return next();
5
- },
6
- cacheControl(next, source, args, context) {
7
- context.overallCachePolicy = args;
8
- return next();
9
- },
10
- });export{serverDirectives};//# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/graphql/directives/index.ts"],"sourcesContent":[null],"names":[],"mappings":"MAEa,gBAAgB,GAAG,CAAC,CAAoB,MAAM;IACvD,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,OAAO,EAAA;AAC9C,QAAA,OAAO,CAAC,mBAAmB,GAAG,OAAO,CAAC;QACtC,OAAO,IAAI,EAAE,CAAC;KACjB;AACD,IAAA,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAA;AACpC,QAAA,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC;QAClC,OAAO,IAAI,EAAE,CAAC;KACjB;AACJ,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './directives';
2
- export * from './schema';
@@ -1 +0,0 @@
1
- 'use strict';Object.defineProperty(exports,'__esModule',{value:true});var directive = "directive @invalidateCache(queries:[String!]!) on MUTATION | FIELD_DEFINITION\n\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\ndirective @cacheControl(\n maxAge: Int\n scope: CacheControlScope\n inheritMaxAge: Boolean\n) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION\n";exports.default=directive;//# sourceMappingURL=directives.graphql.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directives.graphql.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- var directive = "directive @invalidateCache(queries:[String!]!) on MUTATION | FIELD_DEFINITION\n\nenum CacheControlScope {\n PUBLIC\n PRIVATE\n}\n\ndirective @cacheControl(\n maxAge: Int\n scope: CacheControlScope\n inheritMaxAge: Boolean\n) on FIELD_DEFINITION | OBJECT | INTERFACE | UNION\n";export{directive as default};//# sourceMappingURL=directives.graphql.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"directives.graphql.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- 'use strict';var directives=require('./directives.graphql.cjs');const schema = [directives.default].join('\n');exports.schema=schema;//# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../src/graphql/schema/index.ts"],"sourcesContent":[null],"names":["directive"],"mappings":"gEAEO,MAAM,MAAM,GAAG,CAACA,kBAAS,CAAC,CAAC,IAAI,CAAC,IAAI"}
@@ -1 +0,0 @@
1
- export declare const schema: string;
@@ -1 +0,0 @@
1
- import directive from'./directives.graphql.mjs';const schema = [directive].join('\n');export{schema};//# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/graphql/schema/index.ts"],"sourcesContent":[null],"names":[],"mappings":"gDAEO,MAAM,MAAM,GAAG,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI"}
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};