@webiny/handler-graphql 5.43.0-beta.0 → 5.43.0-beta.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.
@@ -85,6 +85,13 @@ var _default = (options = {}) => {
85
85
  }
86
86
  try {
87
87
  const result = await (0, _processRequestBody.processRequestBody)(body, schema, context);
88
+ /**
89
+ * IMPORTANT! Do not send anything if reply was already sent.
90
+ */
91
+ if (reply.sent) {
92
+ console.warn("Reply already sent, cannot send the result (handler-graphql).");
93
+ return reply;
94
+ }
88
95
  return reply.status(200).send(result);
89
96
  } catch (ex) {
90
97
  console.error(`Error while processing the body request.`);
@@ -1 +1 @@
1
- {"version":3,"names":["_boolean","require","_handler","_error","_interopRequireDefault","_createGraphQLSchema","_debugPlugins","_processRequestBody","DEFAULT_CACHE_MAX_AGE","createCacheKey","context","plugins","getSchemaPlugins","tenant","tenancy","getCurrentTenant","contentLocale","i18n","getContentLocale","id","code","length","toString","filter","Boolean","join","createRequestBody","body","JSON","parse","formatErrorPayload","error","WebinyError","stringify","type","message","data","name","stack","_default","options","schema","undefined","cacheKey","debug","boolean","path","route","RoutePlugin","onPost","onOptions","_","reply","status","headers","send","hijack","request","contextCacheKey","createGraphQLSchema","ex","console","result","processRequestBody","debugPlugins","exports","default"],"sources":["createGraphQLHandler.ts"],"sourcesContent":["import { boolean } from \"boolean\";\nimport { GraphQLSchema } from \"graphql\";\nimport { Context, RoutePlugin } from \"@webiny/handler\";\nimport WebinyError from \"@webiny/error\";\nimport { Plugin } from \"@webiny/plugins/types\";\nimport { GraphQLRequestBody, HandlerGraphQLOptions } from \"./types\";\nimport { createGraphQLSchema, getSchemaPlugins } from \"./createGraphQLSchema\";\nimport debugPlugins from \"./debugPlugins\";\nimport { processRequestBody } from \"./processRequestBody\";\n\nconst DEFAULT_CACHE_MAX_AGE = 30758400; // 1 year\n\nconst createCacheKey = (context: Context) => {\n const plugins = getSchemaPlugins(context);\n // TODO: in the near future, we have to assign a fixed name to every\n // TODO: GraphQLSchema plugin, to be able to create a reliable cache key.\n\n // TODO: `getCurrentTenant` should be injected as a parameter.\n // @ts-expect-error TODO: We should not be accessing `context` like this here.\n const tenant = context.tenancy?.getCurrentTenant();\n\n // TODO: `getContentLocale` should be injected as a parameter.\n // @ts-expect-error TODO: We should not be accessing `context` like this here.\n const contentLocale = context.i18n?.getContentLocale();\n\n return [\n tenant ? `tenant:${tenant.id}` : null,\n contentLocale ? `locale:${contentLocale.code}` : null,\n plugins.length.toString()\n ]\n .filter(Boolean)\n .join(\"#\");\n};\n\nconst createRequestBody = (body: unknown): GraphQLRequestBody | GraphQLRequestBody[] => {\n /**\n * We are trusting that the body payload is correct.\n * The `processRequestBody` will fail if it is not.\n */\n return typeof body === \"string\" ? JSON.parse(body) : body;\n};\n\nconst formatErrorPayload = (error: Error): string => {\n if (error instanceof WebinyError) {\n return JSON.stringify({\n type: \"CoreGraphQLWebinyError\",\n message: error.message,\n code: error.code,\n data: error.data\n });\n }\n\n return JSON.stringify({\n type: \"Error\",\n name: error.name,\n message: error.message,\n stack: error.stack\n });\n};\n\nexport default (options: HandlerGraphQLOptions = {}): Plugin[] => {\n let schema: GraphQLSchema | undefined = undefined;\n let cacheKey: string | undefined = undefined;\n\n const debug = boolean(options.debug);\n\n const path = options?.path || \"/graphql\";\n\n const route = new RoutePlugin(async ({ onPost, onOptions, context }) => {\n onOptions(path, async (_, reply) => {\n return reply\n .status(204)\n .headers({\n \"Cache-Control\": `public, max-age=${DEFAULT_CACHE_MAX_AGE}`\n })\n .send({})\n .hijack();\n });\n onPost(path, async (request, reply) => {\n const contextCacheKey = createCacheKey(context as Context);\n if (!schema || cacheKey !== contextCacheKey) {\n try {\n schema = createGraphQLSchema(context);\n cacheKey = contextCacheKey;\n } catch (ex) {\n return reply.code(500).send(formatErrorPayload(ex));\n }\n }\n let body: GraphQLRequestBody | GraphQLRequestBody[];\n try {\n body = createRequestBody(request.body);\n } catch (ex) {\n console.error(`Error while creating the body request.`);\n console.error(formatErrorPayload(ex));\n throw ex;\n }\n try {\n const result = await processRequestBody(body, schema, context);\n return reply.status(200).send(result);\n } catch (ex) {\n console.error(`Error while processing the body request.`);\n console.error(formatErrorPayload(ex));\n throw ex;\n }\n });\n });\n\n route.name = \"handler.graphql.route.default\";\n\n return [\n ...(debug ? debugPlugins() : []),\n {\n type: \"wcp-telemetry-tracker\"\n },\n route\n ];\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAGA,IAAAI,oBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AAEA,MAAMO,qBAAqB,GAAG,QAAQ,CAAC,CAAC;;AAExC,MAAMC,cAAc,GAAIC,OAAgB,IAAK;EACzC,MAAMC,OAAO,GAAG,IAAAC,qCAAgB,EAACF,OAAO,CAAC;EACzC;EACA;;EAEA;EACA;EACA,MAAMG,MAAM,GAAGH,OAAO,CAACI,OAAO,EAAEC,gBAAgB,CAAC,CAAC;;EAElD;EACA;EACA,MAAMC,aAAa,GAAGN,OAAO,CAACO,IAAI,EAAEC,gBAAgB,CAAC,CAAC;EAEtD,OAAO,CACHL,MAAM,GAAG,UAAUA,MAAM,CAACM,EAAE,EAAE,GAAG,IAAI,EACrCH,aAAa,GAAG,UAAUA,aAAa,CAACI,IAAI,EAAE,GAAG,IAAI,EACrDT,OAAO,CAACU,MAAM,CAACC,QAAQ,CAAC,CAAC,CAC5B,CACIC,MAAM,CAACC,OAAO,CAAC,CACfC,IAAI,CAAC,GAAG,CAAC;AAClB,CAAC;AAED,MAAMC,iBAAiB,GAAIC,IAAa,IAAgD;EACpF;AACJ;AACA;AACA;EACI,OAAO,OAAOA,IAAI,KAAK,QAAQ,GAAGC,IAAI,CAACC,KAAK,CAACF,IAAI,CAAC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A3B,QAAA","ignoreList":[]}
1
+ {"version":3,"names":["_boolean","require","_handler","_error","_interopRequireDefault","_createGraphQLSchema","_debugPlugins","_processRequestBody","DEFAULT_CACHE_MAX_AGE","createCacheKey","context","plugins","getSchemaPlugins","tenant","tenancy","getCurrentTenant","contentLocale","i18n","getContentLocale","id","code","length","toString","filter","Boolean","join","createRequestBody","body","JSON","parse","formatErrorPayload","error","WebinyError","stringify","type","message","data","name","stack","_default","options","schema","undefined","cacheKey","debug","boolean","path","route","RoutePlugin","onPost","onOptions","_","reply","status","headers","send","hijack","request","contextCacheKey","createGraphQLSchema","ex","console","result","processRequestBody","sent","warn","debugPlugins","exports","default"],"sources":["createGraphQLHandler.ts"],"sourcesContent":["import { boolean } from \"boolean\";\nimport { GraphQLSchema } from \"graphql\";\nimport { Context, RoutePlugin } from \"@webiny/handler\";\nimport WebinyError from \"@webiny/error\";\nimport { Plugin } from \"@webiny/plugins/types\";\nimport { GraphQLRequestBody, HandlerGraphQLOptions } from \"./types\";\nimport { createGraphQLSchema, getSchemaPlugins } from \"./createGraphQLSchema\";\nimport debugPlugins from \"./debugPlugins\";\nimport { processRequestBody } from \"./processRequestBody\";\n\nconst DEFAULT_CACHE_MAX_AGE = 30758400; // 1 year\n\nconst createCacheKey = (context: Context) => {\n const plugins = getSchemaPlugins(context);\n // TODO: in the near future, we have to assign a fixed name to every\n // TODO: GraphQLSchema plugin, to be able to create a reliable cache key.\n\n // TODO: `getCurrentTenant` should be injected as a parameter.\n // @ts-expect-error TODO: We should not be accessing `context` like this here.\n const tenant = context.tenancy?.getCurrentTenant();\n\n // TODO: `getContentLocale` should be injected as a parameter.\n // @ts-expect-error TODO: We should not be accessing `context` like this here.\n const contentLocale = context.i18n?.getContentLocale();\n\n return [\n tenant ? `tenant:${tenant.id}` : null,\n contentLocale ? `locale:${contentLocale.code}` : null,\n plugins.length.toString()\n ]\n .filter(Boolean)\n .join(\"#\");\n};\n\nconst createRequestBody = (body: unknown): GraphQLRequestBody | GraphQLRequestBody[] => {\n /**\n * We are trusting that the body payload is correct.\n * The `processRequestBody` will fail if it is not.\n */\n return typeof body === \"string\" ? JSON.parse(body) : body;\n};\n\nconst formatErrorPayload = (error: Error): string => {\n if (error instanceof WebinyError) {\n return JSON.stringify({\n type: \"CoreGraphQLWebinyError\",\n message: error.message,\n code: error.code,\n data: error.data\n });\n }\n\n return JSON.stringify({\n type: \"Error\",\n name: error.name,\n message: error.message,\n stack: error.stack\n });\n};\n\nexport default (options: HandlerGraphQLOptions = {}): Plugin[] => {\n let schema: GraphQLSchema | undefined = undefined;\n let cacheKey: string | undefined = undefined;\n\n const debug = boolean(options.debug);\n\n const path = options?.path || \"/graphql\";\n\n const route = new RoutePlugin(async ({ onPost, onOptions, context }) => {\n onOptions(path, async (_, reply) => {\n return reply\n .status(204)\n .headers({\n \"Cache-Control\": `public, max-age=${DEFAULT_CACHE_MAX_AGE}`\n })\n .send({})\n .hijack();\n });\n onPost(path, async (request, reply) => {\n const contextCacheKey = createCacheKey(context as Context);\n if (!schema || cacheKey !== contextCacheKey) {\n try {\n schema = createGraphQLSchema(context);\n cacheKey = contextCacheKey;\n } catch (ex) {\n return reply.code(500).send(formatErrorPayload(ex));\n }\n }\n let body: GraphQLRequestBody | GraphQLRequestBody[];\n try {\n body = createRequestBody(request.body);\n } catch (ex) {\n console.error(`Error while creating the body request.`);\n console.error(formatErrorPayload(ex));\n throw ex;\n }\n try {\n const result = await processRequestBody(body, schema, context);\n /**\n * IMPORTANT! Do not send anything if reply was already sent.\n */\n if (reply.sent) {\n console.warn(\"Reply already sent, cannot send the result (handler-graphql).\");\n return reply;\n }\n return reply.status(200).send(result);\n } catch (ex) {\n console.error(`Error while processing the body request.`);\n console.error(formatErrorPayload(ex));\n throw ex;\n }\n });\n });\n\n route.name = \"handler.graphql.route.default\";\n\n return [\n ...(debug ? debugPlugins() : []),\n {\n type: \"wcp-telemetry-tracker\"\n },\n route\n ];\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,QAA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kBAAkB,CAAC8B,EAAE,CAAC,CAAC;QACvD;MACJ;MACA,IAAIjC,IAA+C;MACnD,IAAI;QACAA,IAAI,GAAGD,iBAAiB,CAAC+B,OAAO,CAAC9B,IAAI,CAAC;MAC1C,CAAC,CAAC,OAAOiC,EAAE,EAAE;QACTC,OAAO,CAAC9B,KAAK,CAAC,wCAAwC,CAAC;QACvD8B,OAAO,CAAC9B,KAAK,CAACD,kBAAkB,CAAC8B,EAAE,CAAC,CAAC;QACrC,MAAMA,EAAE;MACZ;MACA,IAAI;QACA,MAAME,MAAM,GAAG,MAAM,IAAAC,sCAAkB,EAACpC,IAAI,EAAEc,MAAM,EAAE/B,OAAO,CAAC;QAC9D;AAChB;AACA;QACgB,IAAI0C,KAAK,CAACY,IAAI,EAAE;UACZH,OAAO,CAACI,IAAI,CAAC,+DAA+D,CAAC;UAC7E,OAAOb,KAAK;QAChB;QACA,OAAOA,KAAK,CAACC,MAAM,CAAC,GAAG,CAAC,CAACE,IAAI,CAACO,MAAM,CAAC;MACzC,CAAC,CAAC,OAAOF,EAAE,EAAE;QACTC,OAAO,CAAC9B,KAAK,CAAC,0CAA0C,CAAC;QACzD8B,OAAO,CAAC9B,KAAK,CAACD,kBAAkB,CAAC8B,EAAE,CAAC,CAAC;QACrC,MAAMA,EAAE;MACZ;IACJ,CAAC,CAAC;EACN,CAAC,CAAC;EAEFb,KAAK,CAACV,IAAI,GAAG,+BAA+B;EAE5C,OAAO,CACH,IAAIO,KAAK,GAAG,IAAAsB,qBAAY,EAAC,CAAC,GAAG,EAAE,CAAC,EAChC;IACIhC,IAAI,EAAE;EACV,CAAC,EACDa,KAAK,CACR;AACL,CAAC;AAAAoB,OAAA,CAAAC,OAAA,GAAA7B,QAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/handler-graphql",
3
- "version": "5.43.0-beta.0",
3
+ "version": "5.43.0-beta.1",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,23 +18,22 @@
18
18
  "@graphql-tools/resolvers-composition": "7.0.2",
19
19
  "@graphql-tools/schema": "10.0.7",
20
20
  "@graphql-tools/utils": "10.5.5",
21
- "@webiny/api": "5.43.0-beta.0",
22
- "@webiny/error": "5.43.0-beta.0",
23
- "@webiny/handler": "5.43.0-beta.0",
24
- "@webiny/plugins": "5.43.0-beta.0",
21
+ "@webiny/api": "5.43.0-beta.1",
22
+ "@webiny/error": "5.43.0-beta.1",
23
+ "@webiny/handler": "5.43.0-beta.1",
24
+ "@webiny/plugins": "5.43.0-beta.1",
25
25
  "boolean": "3.2.0",
26
26
  "graphql": "15.9.0",
27
27
  "graphql-scalars": "1.12.0",
28
28
  "graphql-tag": "2.12.6"
29
29
  },
30
30
  "devDependencies": {
31
- "@webiny/handler-aws": "5.43.0-beta.0",
32
- "@webiny/project-utils": "5.43.0-beta.0",
31
+ "@webiny/handler-aws": "5.43.0-beta.1",
32
+ "@webiny/project-utils": "5.43.0-beta.1",
33
33
  "jest": "29.7.0",
34
34
  "jest-mock-console": "2.0.0",
35
35
  "rimraf": "6.0.1",
36
- "ttypescript": "1.5.15",
37
- "typescript": "4.9.5"
36
+ "typescript": "5.3.3"
38
37
  },
39
38
  "publishConfig": {
40
39
  "access": "public",
@@ -44,5 +43,5 @@
44
43
  "build": "node ../cli/bin.js run build",
45
44
  "watch": "node ../cli/bin.js run watch"
46
45
  },
47
- "gitHead": "abfb4ec7b4391f2414cd22f2c5539c84b6c8abbf"
46
+ "gitHead": "d47a234b09383cb7ab2d9907300b8eaa89aa64d6"
48
47
  }
@@ -9,7 +9,7 @@ export declare const emptyResolver: () => {};
9
9
  interface ResolveCallable<T = GenericRecord> {
10
10
  (): Promise<T>;
11
11
  }
12
- export declare const resolve: <T = GenericRecord<PropertyKey, any>>(fn: ResolveCallable<T>) => Promise<ErrorResponse | Response<Awaited<T>>>;
12
+ export declare const resolve: <T = GenericRecord>(fn: ResolveCallable<T>) => Promise<ErrorResponse | Response<Awaited<T>>>;
13
13
  interface ResolveListCallable<T> {
14
14
  (): Promise<IListResult<T>>;
15
15
  }
@@ -17,5 +17,5 @@ interface IListResult<T = GenericRecord> {
17
17
  items: T[];
18
18
  meta: Meta;
19
19
  }
20
- export declare const resolveList: <T = GenericRecord<PropertyKey, any>>(fn: ResolveListCallable<T>) => Promise<ListErrorResponse | ListResponse<T, Meta>>;
20
+ export declare const resolveList: <T = GenericRecord>(fn: ResolveListCallable<T>) => Promise<ListErrorResponse | ListResponse<T, Meta>>;
21
21
  export {};