@strapi/plugin-graphql 4.26.0 → 4.26.2

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 (69) hide show
  1. package/dist/_chunks/{dk-KmLnUoJC.mjs → dk-BbJCmDw6.mjs} +1 -1
  2. package/dist/_chunks/dk-BbJCmDw6.mjs.map +1 -0
  3. package/dist/_chunks/{dk-SLrLqAtl.js → dk-C9NcSzyg.js} +1 -1
  4. package/dist/_chunks/dk-C9NcSzyg.js.map +1 -0
  5. package/dist/_chunks/{en-WmmC2MW8.js → en-BiKpmhCU.js} +1 -1
  6. package/dist/_chunks/en-BiKpmhCU.js.map +1 -0
  7. package/dist/_chunks/{en-A16mqbIV.mjs → en-YIQYYlvv.mjs} +1 -1
  8. package/dist/_chunks/en-YIQYYlvv.mjs.map +1 -0
  9. package/dist/_chunks/{es-_xZ14QXK.mjs → es-BbsZ5Fh0.mjs} +1 -1
  10. package/dist/_chunks/es-BbsZ5Fh0.mjs.map +1 -0
  11. package/dist/_chunks/{es-4tl6ikyU.js → es-DE22V9D4.js} +1 -1
  12. package/dist/_chunks/es-DE22V9D4.js.map +1 -0
  13. package/dist/_chunks/{fr-4BkQ-Qvt.mjs → fr-BgqFw7G8.mjs} +1 -1
  14. package/dist/_chunks/fr-BgqFw7G8.mjs.map +1 -0
  15. package/dist/_chunks/{fr-cJXSt55N.js → fr-Ca-HowfR.js} +1 -1
  16. package/dist/_chunks/fr-Ca-HowfR.js.map +1 -0
  17. package/dist/_chunks/{pl-TWurBBP_.mjs → pl-CbET57Jb.mjs} +1 -1
  18. package/dist/_chunks/pl-CbET57Jb.mjs.map +1 -0
  19. package/dist/_chunks/{pl-wKw9Xgkw.js → pl-DVnJGR87.js} +1 -1
  20. package/dist/_chunks/pl-DVnJGR87.js.map +1 -0
  21. package/dist/_chunks/{ru-aD804UEo.mjs → ru-BFz40YSA.mjs} +1 -1
  22. package/dist/_chunks/ru-BFz40YSA.mjs.map +1 -0
  23. package/dist/_chunks/{ru-CYAnXR6L.js → ru-o4zaP02C.js} +1 -1
  24. package/dist/_chunks/ru-o4zaP02C.js.map +1 -0
  25. package/dist/_chunks/{sv-XNOe1ctV.js → sv-9qK4y9fb.js} +1 -1
  26. package/dist/_chunks/sv-9qK4y9fb.js.map +1 -0
  27. package/dist/_chunks/{sv-N5RufX6w.mjs → sv-CNYcKBn2.mjs} +1 -1
  28. package/dist/_chunks/sv-CNYcKBn2.mjs.map +1 -0
  29. package/dist/_chunks/{tr-UmSHgD8y.mjs → tr-H1PrR6RM.mjs} +1 -1
  30. package/dist/_chunks/tr-H1PrR6RM.mjs.map +1 -0
  31. package/dist/_chunks/{tr-POFbAHUC.js → tr-fBBDNMBY.js} +1 -1
  32. package/dist/_chunks/tr-fBBDNMBY.js.map +1 -0
  33. package/dist/_chunks/{zh-KvwXXMnA.mjs → zh-BEh3jejH.mjs} +1 -1
  34. package/dist/_chunks/zh-BEh3jejH.mjs.map +1 -0
  35. package/dist/_chunks/{zh-kJ_DkSIe.js → zh-CyCKPuL0.js} +1 -1
  36. package/dist/_chunks/zh-CyCKPuL0.js.map +1 -0
  37. package/dist/_chunks/{zh-Hans-pnigVFnS.js → zh-Hans-Btuz6Y7W.js} +1 -1
  38. package/dist/_chunks/zh-Hans-Btuz6Y7W.js.map +1 -0
  39. package/dist/_chunks/{zh-Hans-ClgXy4wM.mjs → zh-Hans-CRQss50D.mjs} +1 -1
  40. package/dist/_chunks/zh-Hans-CRQss50D.mjs.map +1 -0
  41. package/dist/admin/index.js +11 -114
  42. package/dist/admin/index.js.map +1 -1
  43. package/dist/admin/index.mjs +11 -114
  44. package/dist/admin/index.mjs.map +1 -1
  45. package/dist/server/index.js +7 -14
  46. package/dist/server/index.js.map +1 -1
  47. package/dist/server/index.mjs +8 -14
  48. package/dist/server/index.mjs.map +1 -1
  49. package/package.json +13 -13
  50. package/dist/_chunks/dk-KmLnUoJC.mjs.map +0 -1
  51. package/dist/_chunks/dk-SLrLqAtl.js.map +0 -1
  52. package/dist/_chunks/en-A16mqbIV.mjs.map +0 -1
  53. package/dist/_chunks/en-WmmC2MW8.js.map +0 -1
  54. package/dist/_chunks/es-4tl6ikyU.js.map +0 -1
  55. package/dist/_chunks/es-_xZ14QXK.mjs.map +0 -1
  56. package/dist/_chunks/fr-4BkQ-Qvt.mjs.map +0 -1
  57. package/dist/_chunks/fr-cJXSt55N.js.map +0 -1
  58. package/dist/_chunks/pl-TWurBBP_.mjs.map +0 -1
  59. package/dist/_chunks/pl-wKw9Xgkw.js.map +0 -1
  60. package/dist/_chunks/ru-CYAnXR6L.js.map +0 -1
  61. package/dist/_chunks/ru-aD804UEo.mjs.map +0 -1
  62. package/dist/_chunks/sv-N5RufX6w.mjs.map +0 -1
  63. package/dist/_chunks/sv-XNOe1ctV.js.map +0 -1
  64. package/dist/_chunks/tr-POFbAHUC.js.map +0 -1
  65. package/dist/_chunks/tr-UmSHgD8y.mjs.map +0 -1
  66. package/dist/_chunks/zh-Hans-ClgXy4wM.mjs.map +0 -1
  67. package/dist/_chunks/zh-Hans-pnigVFnS.js.map +0 -1
  68. package/dist/_chunks/zh-KvwXXMnA.mjs.map +0 -1
  69. package/dist/_chunks/zh-kJ_DkSIe.js.map +0 -1
@@ -6,4 +6,4 @@ const dk = {
6
6
  export {
7
7
  dk as default
8
8
  };
9
- //# sourceMappingURL=dk-KmLnUoJC.mjs.map
9
+ //# sourceMappingURL=dk-BbJCmDw6.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dk-BbJCmDw6.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const dk = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = dk;
9
- //# sourceMappingURL=dk-SLrLqAtl.js.map
9
+ //# sourceMappingURL=dk-C9NcSzyg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dk-C9NcSzyg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const en = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = en;
9
- //# sourceMappingURL=en-WmmC2MW8.js.map
9
+ //# sourceMappingURL=en-BiKpmhCU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-BiKpmhCU.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const en = {
6
6
  export {
7
7
  en as default
8
8
  };
9
- //# sourceMappingURL=en-A16mqbIV.mjs.map
9
+ //# sourceMappingURL=en-YIQYYlvv.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"en-YIQYYlvv.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const es = {
6
6
  export {
7
7
  es as default
8
8
  };
9
- //# sourceMappingURL=es-_xZ14QXK.mjs.map
9
+ //# sourceMappingURL=es-BbsZ5Fh0.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-BbsZ5Fh0.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const es = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = es;
9
- //# sourceMappingURL=es-4tl6ikyU.js.map
9
+ //# sourceMappingURL=es-DE22V9D4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"es-DE22V9D4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const fr = {
6
6
  export {
7
7
  fr as default
8
8
  };
9
- //# sourceMappingURL=fr-4BkQ-Qvt.mjs.map
9
+ //# sourceMappingURL=fr-BgqFw7G8.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-BgqFw7G8.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const fr = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = fr;
9
- //# sourceMappingURL=fr-cJXSt55N.js.map
9
+ //# sourceMappingURL=fr-Ca-HowfR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fr-Ca-HowfR.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const pl = {
6
6
  export {
7
7
  pl as default
8
8
  };
9
- //# sourceMappingURL=pl-TWurBBP_.mjs.map
9
+ //# sourceMappingURL=pl-CbET57Jb.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl-CbET57Jb.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const pl = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = pl;
9
- //# sourceMappingURL=pl-wKw9Xgkw.js.map
9
+ //# sourceMappingURL=pl-DVnJGR87.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pl-DVnJGR87.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const ru = {
6
6
  export {
7
7
  ru as default
8
8
  };
9
- //# sourceMappingURL=ru-aD804UEo.mjs.map
9
+ //# sourceMappingURL=ru-BFz40YSA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-BFz40YSA.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const ru = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = ru;
9
- //# sourceMappingURL=ru-CYAnXR6L.js.map
9
+ //# sourceMappingURL=ru-o4zaP02C.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ru-o4zaP02C.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const sv = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = sv;
9
- //# sourceMappingURL=sv-XNOe1ctV.js.map
9
+ //# sourceMappingURL=sv-9qK4y9fb.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv-9qK4y9fb.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const sv = {
6
6
  export {
7
7
  sv as default
8
8
  };
9
- //# sourceMappingURL=sv-N5RufX6w.mjs.map
9
+ //# sourceMappingURL=sv-CNYcKBn2.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sv-CNYcKBn2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const tr = {
6
6
  export {
7
7
  tr as default
8
8
  };
9
- //# sourceMappingURL=tr-UmSHgD8y.mjs.map
9
+ //# sourceMappingURL=tr-H1PrR6RM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr-H1PrR6RM.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const tr = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = tr;
9
- //# sourceMappingURL=tr-POFbAHUC.js.map
9
+ //# sourceMappingURL=tr-fBBDNMBY.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr-fBBDNMBY.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const zh = {
6
6
  export {
7
7
  zh as default
8
8
  };
9
- //# sourceMappingURL=zh-KvwXXMnA.mjs.map
9
+ //# sourceMappingURL=zh-BEh3jejH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-BEh3jejH.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -6,4 +6,4 @@ const zh = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = zh;
9
- //# sourceMappingURL=zh-kJ_DkSIe.js.map
9
+ //# sourceMappingURL=zh-CyCKPuL0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-CyCKPuL0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const zhHans = {
6
6
  "plugin.name": "GraphQL"
7
7
  };
8
8
  exports.default = zhHans;
9
- //# sourceMappingURL=zh-Hans-pnigVFnS.js.map
9
+ //# sourceMappingURL=zh-Hans-Btuz6Y7W.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-Hans-Btuz6Y7W.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -6,4 +6,4 @@ const zhHans = {
6
6
  export {
7
7
  zhHans as default
8
8
  };
9
- //# sourceMappingURL=zh-Hans-ClgXy4wM.mjs.map
9
+ //# sourceMappingURL=zh-Hans-CRQss50D.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-Hans-CRQss50D.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,128 +1,25 @@
1
1
  "use strict";
2
2
  const helperPlugin = require("@strapi/helper-plugin");
3
- const __variableDynamicImportRuntimeHelper = (glob, path) => {
3
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
4
4
  const v = glob[path];
5
5
  if (v) {
6
6
  return typeof v === "function" ? v() : Promise.resolve(v);
7
7
  }
8
8
  return new Promise((_, reject) => {
9
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
9
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
10
+ reject.bind(
11
+ null,
12
+ new Error(
13
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
14
+ )
15
+ )
16
+ );
10
17
  });
11
18
  };
12
- const name$1 = "@strapi/plugin-graphql";
13
- const version = "4.25.24";
14
- const description = "Adds GraphQL endpoint with default API methods.";
15
- const repository = {
16
- type: "git",
17
- url: "https://github.com/strapi/strapi.git",
18
- directory: "packages/plugins/graphql"
19
- };
20
- const license = "SEE LICENSE IN LICENSE";
21
- const author = {
22
- name: "Strapi Solutions SAS",
23
- email: "hi@strapi.io",
24
- url: "https://strapi.io"
25
- };
26
- const maintainers = [
27
- {
28
- name: "Strapi Solutions SAS",
29
- email: "hi@strapi.io",
30
- url: "https://strapi.io"
31
- }
32
- ];
33
- const exports$1 = {
34
- "./strapi-admin": {
35
- types: "./dist/admin/src/index.d.ts",
36
- source: "./admin/src/index.ts",
37
- "import": "./dist/admin/index.mjs",
38
- require: "./dist/admin/index.js",
39
- "default": "./dist/admin/index.js"
40
- },
41
- "./strapi-server": {
42
- types: "./dist/server/src/index.d.ts",
43
- source: "./server/src/index.ts",
44
- "import": "./dist/server/index.mjs",
45
- require: "./dist/server/index.js",
46
- "default": "./dist/server/index.js"
47
- },
48
- "./package.json": "./package.json"
49
- };
50
- const files = [
51
- "./dist",
52
- "strapi-server.js"
53
- ];
54
- const scripts = {
55
- build: "strapi plugin:build --force",
56
- clean: "run -T rimraf ./dist",
57
- lint: "run -T eslint .",
58
- watch: "strapi plugin:watch"
59
- };
60
- const dependencies = {
61
- "@graphql-tools/schema": "8.5.1",
62
- "@graphql-tools/utils": "^8.13.1",
63
- "@strapi/design-system": "1.19.0",
64
- "@strapi/helper-plugin": "4.25.24",
65
- "@strapi/icons": "1.19.0",
66
- "@strapi/utils": "4.25.24",
67
- "apollo-server-core": "3.12.1",
68
- "apollo-server-koa": "3.10.0",
69
- graphql: "^15.5.1",
70
- "graphql-depth-limit": "^1.1.0",
71
- "graphql-playground-middleware-koa": "^1.6.21",
72
- "graphql-scalars": "1.22.2",
73
- "graphql-upload": "^13.0.0",
74
- "koa-compose": "^4.1.0",
75
- lodash: "4.17.21",
76
- nexus: "1.3.0",
77
- pluralize: "8.0.0"
78
- };
79
- const devDependencies = {
80
- "@strapi/strapi": "4.25.24",
81
- "@strapi/types": "4.25.24",
82
- "@types/graphql-depth-limit": "1.1.5",
83
- "@types/graphql-upload": "8.0.12",
84
- "cross-env": "^7.0.3",
85
- "eslint-config-custom": "4.25.24",
86
- koa: "2.16.1",
87
- react: "^18.2.0",
88
- "react-dom": "^18.2.0",
89
- "react-router-dom": "5.3.4",
90
- "styled-components": "5.3.3",
91
- tsconfig: "4.25.24",
92
- typescript: "5.2.2"
93
- };
94
- const peerDependencies = {
95
- "@strapi/strapi": "^4.0.0",
96
- react: "^17.0.0 || ^18.0.0",
97
- "react-dom": "^17.0.0 || ^18.0.0",
98
- "react-router-dom": "^5.2.0",
99
- "styled-components": "^5.2.1"
100
- };
101
- const engines = {
102
- node: ">=18.0.0 <=20.x.x",
103
- npm: ">=6.0.0"
104
- };
105
19
  const strapi = {
106
- displayName: "GraphQL",
107
- name: "graphql",
108
- description: "Adds GraphQL endpoint with default API methods.",
109
- kind: "plugin"
20
+ name: "graphql"
110
21
  };
111
22
  const pluginPkg = {
112
- name: name$1,
113
- version,
114
- description,
115
- repository,
116
- license,
117
- author,
118
- maintainers,
119
- exports: exports$1,
120
- files,
121
- scripts,
122
- dependencies,
123
- devDependencies,
124
- peerDependencies,
125
- engines,
126
23
  strapi
127
24
  };
128
25
  const pluginId = "graphql";
@@ -140,7 +37,7 @@ const index = {
140
37
  async registerTrads({ locales }) {
141
38
  const importedTrads = await Promise.all(
142
39
  locales.map((locale) => {
143
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => Promise.resolve().then(() => require("../_chunks/dk-SLrLqAtl.js")), "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-WmmC2MW8.js")), "./translations/es.json": () => Promise.resolve().then(() => require("../_chunks/es-4tl6ikyU.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("../_chunks/fr-cJXSt55N.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("../_chunks/pl-wKw9Xgkw.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("../_chunks/ru-CYAnXR6L.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("../_chunks/sv-XNOe1ctV.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("../_chunks/tr-POFbAHUC.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("../_chunks/zh-Hans-pnigVFnS.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("../_chunks/zh-kJ_DkSIe.js")) }), `./translations/${locale}.json`).then(({ default: data }) => {
40
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => Promise.resolve().then(() => require("../_chunks/dk-C9NcSzyg.js")), "./translations/en.json": () => Promise.resolve().then(() => require("../_chunks/en-BiKpmhCU.js")), "./translations/es.json": () => Promise.resolve().then(() => require("../_chunks/es-DE22V9D4.js")), "./translations/fr.json": () => Promise.resolve().then(() => require("../_chunks/fr-Ca-HowfR.js")), "./translations/pl.json": () => Promise.resolve().then(() => require("../_chunks/pl-DVnJGR87.js")), "./translations/ru.json": () => Promise.resolve().then(() => require("../_chunks/ru-o4zaP02C.js")), "./translations/sv.json": () => Promise.resolve().then(() => require("../_chunks/sv-9qK4y9fb.js")), "./translations/tr.json": () => Promise.resolve().then(() => require("../_chunks/tr-fBBDNMBY.js")), "./translations/zh-Hans.json": () => Promise.resolve().then(() => require("../_chunks/zh-Hans-Btuz6Y7W.js")), "./translations/zh.json": () => Promise.resolve().then(() => require("../_chunks/zh-CyCKPuL0.js")) }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
144
41
  return {
145
42
  data: helperPlugin.prefixPluginTranslations(data, pluginId),
146
43
  locale
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n // TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["prefixPluginTranslations"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAe,QAAA;AAAA;AAAA,EAEb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AAChD,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACf,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,+BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,gCAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,GAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AACpB,iBAAA;AAAA,YACL,MAAMA,aAAAA,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;"}
1
+ {"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n // TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":["prefixPluginTranslations"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAA,QAAe;AAAA;AAAA,EAEb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AACtD,UAAM,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACtB,eAAO,qCAAA,uBAAA,OAAA,EAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,qCAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,IAAA,+BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,gCAAA,CAAA,GAAA,0BAAA,MAAA,QAAA,QAAA,EAAA,KAAA,MAAA,QAAA,2BAAA,CAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,SAAA,CAAA,EACJ,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AAC3B,iBAAO;AAAA,YACL,MAAMA,aAAAA,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QAEJ,CAAC,EACA,MAAM,MAAM;AACX,iBAAO;AAAA,YACL,MAAM,CAAA;AAAA,YACN;AAAA,UAAA;AAAA,QAEJ,CAAC;AAAA,MACL,CAAC;AAAA,IAAA;AAGH,WAAO,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;"}
@@ -1,127 +1,24 @@
1
1
  import { prefixPluginTranslations } from "@strapi/helper-plugin";
2
- const __variableDynamicImportRuntimeHelper = (glob, path) => {
2
+ const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
3
3
  const v = glob[path];
4
4
  if (v) {
5
5
  return typeof v === "function" ? v() : Promise.resolve(v);
6
6
  }
7
7
  return new Promise((_, reject) => {
8
- (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(reject.bind(null, new Error("Unknown variable dynamic import: " + path)));
8
+ (typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
9
+ reject.bind(
10
+ null,
11
+ new Error(
12
+ "Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
13
+ )
14
+ )
15
+ );
9
16
  });
10
17
  };
11
- const name$1 = "@strapi/plugin-graphql";
12
- const version = "4.25.24";
13
- const description = "Adds GraphQL endpoint with default API methods.";
14
- const repository = {
15
- type: "git",
16
- url: "https://github.com/strapi/strapi.git",
17
- directory: "packages/plugins/graphql"
18
- };
19
- const license = "SEE LICENSE IN LICENSE";
20
- const author = {
21
- name: "Strapi Solutions SAS",
22
- email: "hi@strapi.io",
23
- url: "https://strapi.io"
24
- };
25
- const maintainers = [
26
- {
27
- name: "Strapi Solutions SAS",
28
- email: "hi@strapi.io",
29
- url: "https://strapi.io"
30
- }
31
- ];
32
- const exports = {
33
- "./strapi-admin": {
34
- types: "./dist/admin/src/index.d.ts",
35
- source: "./admin/src/index.ts",
36
- "import": "./dist/admin/index.mjs",
37
- require: "./dist/admin/index.js",
38
- "default": "./dist/admin/index.js"
39
- },
40
- "./strapi-server": {
41
- types: "./dist/server/src/index.d.ts",
42
- source: "./server/src/index.ts",
43
- "import": "./dist/server/index.mjs",
44
- require: "./dist/server/index.js",
45
- "default": "./dist/server/index.js"
46
- },
47
- "./package.json": "./package.json"
48
- };
49
- const files = [
50
- "./dist",
51
- "strapi-server.js"
52
- ];
53
- const scripts = {
54
- build: "strapi plugin:build --force",
55
- clean: "run -T rimraf ./dist",
56
- lint: "run -T eslint .",
57
- watch: "strapi plugin:watch"
58
- };
59
- const dependencies = {
60
- "@graphql-tools/schema": "8.5.1",
61
- "@graphql-tools/utils": "^8.13.1",
62
- "@strapi/design-system": "1.19.0",
63
- "@strapi/helper-plugin": "4.25.24",
64
- "@strapi/icons": "1.19.0",
65
- "@strapi/utils": "4.25.24",
66
- "apollo-server-core": "3.12.1",
67
- "apollo-server-koa": "3.10.0",
68
- graphql: "^15.5.1",
69
- "graphql-depth-limit": "^1.1.0",
70
- "graphql-playground-middleware-koa": "^1.6.21",
71
- "graphql-scalars": "1.22.2",
72
- "graphql-upload": "^13.0.0",
73
- "koa-compose": "^4.1.0",
74
- lodash: "4.17.21",
75
- nexus: "1.3.0",
76
- pluralize: "8.0.0"
77
- };
78
- const devDependencies = {
79
- "@strapi/strapi": "4.25.24",
80
- "@strapi/types": "4.25.24",
81
- "@types/graphql-depth-limit": "1.1.5",
82
- "@types/graphql-upload": "8.0.12",
83
- "cross-env": "^7.0.3",
84
- "eslint-config-custom": "4.25.24",
85
- koa: "2.16.1",
86
- react: "^18.2.0",
87
- "react-dom": "^18.2.0",
88
- "react-router-dom": "5.3.4",
89
- "styled-components": "5.3.3",
90
- tsconfig: "4.25.24",
91
- typescript: "5.2.2"
92
- };
93
- const peerDependencies = {
94
- "@strapi/strapi": "^4.0.0",
95
- react: "^17.0.0 || ^18.0.0",
96
- "react-dom": "^17.0.0 || ^18.0.0",
97
- "react-router-dom": "^5.2.0",
98
- "styled-components": "^5.2.1"
99
- };
100
- const engines = {
101
- node: ">=18.0.0 <=20.x.x",
102
- npm: ">=6.0.0"
103
- };
104
18
  const strapi = {
105
- displayName: "GraphQL",
106
- name: "graphql",
107
- description: "Adds GraphQL endpoint with default API methods.",
108
- kind: "plugin"
19
+ name: "graphql"
109
20
  };
110
21
  const pluginPkg = {
111
- name: name$1,
112
- version,
113
- description,
114
- repository,
115
- license,
116
- author,
117
- maintainers,
118
- exports,
119
- files,
120
- scripts,
121
- dependencies,
122
- devDependencies,
123
- peerDependencies,
124
- engines,
125
22
  strapi
126
23
  };
127
24
  const pluginId = "graphql";
@@ -139,7 +36,7 @@ const index = {
139
36
  async registerTrads({ locales }) {
140
37
  const importedTrads = await Promise.all(
141
38
  locales.map((locale) => {
142
- return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => import("../_chunks/dk-KmLnUoJC.mjs"), "./translations/en.json": () => import("../_chunks/en-A16mqbIV.mjs"), "./translations/es.json": () => import("../_chunks/es-_xZ14QXK.mjs"), "./translations/fr.json": () => import("../_chunks/fr-4BkQ-Qvt.mjs"), "./translations/pl.json": () => import("../_chunks/pl-TWurBBP_.mjs"), "./translations/ru.json": () => import("../_chunks/ru-aD804UEo.mjs"), "./translations/sv.json": () => import("../_chunks/sv-N5RufX6w.mjs"), "./translations/tr.json": () => import("../_chunks/tr-UmSHgD8y.mjs"), "./translations/zh-Hans.json": () => import("../_chunks/zh-Hans-ClgXy4wM.mjs"), "./translations/zh.json": () => import("../_chunks/zh-KvwXXMnA.mjs") }), `./translations/${locale}.json`).then(({ default: data }) => {
39
+ return __variableDynamicImportRuntimeHelper(/* @__PURE__ */ Object.assign({ "./translations/dk.json": () => import("../_chunks/dk-BbJCmDw6.mjs"), "./translations/en.json": () => import("../_chunks/en-YIQYYlvv.mjs"), "./translations/es.json": () => import("../_chunks/es-BbsZ5Fh0.mjs"), "./translations/fr.json": () => import("../_chunks/fr-BgqFw7G8.mjs"), "./translations/pl.json": () => import("../_chunks/pl-CbET57Jb.mjs"), "./translations/ru.json": () => import("../_chunks/ru-BFz40YSA.mjs"), "./translations/sv.json": () => import("../_chunks/sv-CNYcKBn2.mjs"), "./translations/tr.json": () => import("../_chunks/tr-H1PrR6RM.mjs"), "./translations/zh-Hans.json": () => import("../_chunks/zh-Hans-CRQss50D.mjs"), "./translations/zh.json": () => import("../_chunks/zh-BEh3jejH.mjs") }), `./translations/${locale}.json`, 3).then(({ default: data }) => {
143
40
  return {
144
41
  data: prefixPluginTranslations(data, pluginId),
145
42
  locale
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n // TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAe,QAAA;AAAA;AAAA,EAEb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AAChD,UAAA,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACf,eAAA,qCAA+B,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,+BAAA,MAAA,OAAA,iCAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,OAAA,EACnC,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AACpB,iBAAA;AAAA,YACL,MAAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QACF,CACD,EACA,MAAM,MAAM;AACJ,iBAAA;AAAA,YACL,MAAM,CAAC;AAAA,YACP;AAAA,UAAA;AAAA,QACF,CACD;AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","import { prefixPluginTranslations } from '@strapi/helper-plugin';\n\nimport pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\n\nconst name = pluginPkg.strapi.name;\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n // TODO: we need to have the type for StrapiApp done from `@strapi/admin` package.\n register(app: any) {\n app.registerPlugin({\n id: pluginId,\n name,\n });\n },\n bootstrap() {},\n async registerTrads({ locales }: { locales: string[] }) {\n const importedTrads = await Promise.all(\n locales.map((locale) => {\n return import(`./translations/${locale}.json`)\n .then(({ default: data }) => {\n return {\n data: prefixPluginTranslations(data, pluginId),\n locale,\n };\n })\n .catch(() => {\n return {\n data: {},\n locale,\n };\n });\n })\n );\n\n return Promise.resolve(importedTrads);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACMxB,MAAM,OAAO,UAAU,OAAO;AAG9B,MAAA,QAAe;AAAA;AAAA,EAEb,SAAS,KAAU;AACjB,QAAI,eAAe;AAAA,MACjB,IAAI;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EACH;AAAA,EACA,YAAY;AAAA,EAAC;AAAA,EACb,MAAM,cAAc,EAAE,WAAkC;AACtD,UAAM,gBAAgB,MAAM,QAAQ;AAAA,MAClC,QAAQ,IAAI,CAAC,WAAW;AACtB,eAAO,qCAAA,uBAAA,OAAA,EAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,GAAA,+BAAA,MAAA,OAAA,iCAAA,GAAA,0BAAA,MAAA,OAAA,4BAAA,EAAA,CAAA,GAAA,kBAAA,MAAA,SAAA,CAAA,EACJ,KAAK,CAAC,EAAE,SAAS,KAAA,MAAW;AAC3B,iBAAO;AAAA,YACL,MAAM,yBAAyB,MAAM,QAAQ;AAAA,YAC7C;AAAA,UAAA;AAAA,QAEJ,CAAC,EACA,MAAM,MAAM;AACX,iBAAO;AAAA,YACL,MAAM,CAAA;AAAA,YACN;AAAA,UAAA;AAAA,QAEJ,CAAC;AAAA,MACL,CAAC;AAAA,IAAA;AAGH,WAAO,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;"}
@@ -12,8 +12,7 @@ const pluralize = require("pluralize");
12
12
  const graphqlScalars = require("graphql-scalars");
13
13
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
14
14
  function _interopNamespace(e) {
15
- if (e && e.__esModule)
16
- return e;
15
+ if (e && e.__esModule) return e;
17
16
  const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
18
17
  if (e) {
19
18
  for (const k in e) {
@@ -1625,8 +1624,7 @@ const typeBuilder = (context) => {
1625
1624
  builder,
1626
1625
  attributeName,
1627
1626
  attribute,
1628
- contentType: contentType2,
1629
- context
1627
+ contentType: contentType2
1630
1628
  };
1631
1629
  if (isEnumeration(attribute)) {
1632
1630
  addEnumAttribute(options);
@@ -2093,10 +2091,8 @@ const contentType = ({ strapi: strapi2 }) => {
2093
2091
  const { getFiltersInputTypeName } = utils2.naming;
2094
2092
  const { isMorphRelation } = utils2.attributes;
2095
2093
  const model = "target" in attribute && strapi2.getModel(attribute.target);
2096
- if (!model || isMorphRelation(attribute))
2097
- return;
2098
- if (extension.shadowCRUD(model.uid).isDisabled())
2099
- return;
2094
+ if (!model || isMorphRelation(attribute)) return;
2095
+ if (extension.shadowCRUD(model.uid).isDisabled()) return;
2100
2096
  builder.field(attributeName, { type: getFiltersInputTypeName(model) });
2101
2097
  };
2102
2098
  const addComponentAttribute = (builder, attributeName, attribute) => {
@@ -2104,10 +2100,8 @@ const contentType = ({ strapi: strapi2 }) => {
2104
2100
  const extension = strapi2.plugin("graphql").service("extension");
2105
2101
  const { getFiltersInputTypeName } = utils2.naming;
2106
2102
  const component = strapi2.getModel(attribute.component);
2107
- if (!component)
2108
- return;
2109
- if (extension.shadowCRUD(component.uid).isDisabled())
2110
- return;
2103
+ if (!component) return;
2104
+ if (extension.shadowCRUD(component.uid).isDisabled()) return;
2111
2105
  builder.field(attributeName, { type: getFiltersInputTypeName(component) });
2112
2106
  };
2113
2107
  const buildContentTypeFilters = (contentType2) => {
@@ -2633,8 +2627,7 @@ const utils = ({ strapi: strapi2 }) => {
2633
2627
  const { args: args2 } = getService("internals");
2634
2628
  const { modelType } = contentType2;
2635
2629
  if (modelType === "component") {
2636
- if (!multiple)
2637
- return {};
2630
+ if (!multiple) return {};
2638
2631
  return {
2639
2632
  filters: naming2.getFiltersInputTypeName(contentType2),
2640
2633
  pagination: args2.PaginationArg,