@strapi/plugin-graphql 5.4.1 → 5.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/dk-BbJCmDw6.mjs +0 -1
- package/dist/_chunks/dk-C9NcSzyg.js +0 -1
- package/dist/_chunks/en-BiKpmhCU.js +0 -1
- package/dist/_chunks/en-YIQYYlvv.mjs +0 -1
- package/dist/_chunks/es-BbsZ5Fh0.mjs +0 -1
- package/dist/_chunks/es-DE22V9D4.js +0 -1
- package/dist/_chunks/fr-BgqFw7G8.mjs +0 -1
- package/dist/_chunks/fr-Ca-HowfR.js +0 -1
- package/dist/_chunks/pl-CbET57Jb.mjs +0 -1
- package/dist/_chunks/pl-DVnJGR87.js +0 -1
- package/dist/_chunks/ru-BFz40YSA.mjs +0 -1
- package/dist/_chunks/ru-o4zaP02C.js +0 -1
- package/dist/_chunks/sv-9qK4y9fb.js +0 -1
- package/dist/_chunks/sv-CNYcKBn2.mjs +0 -1
- package/dist/_chunks/tr-H1PrR6RM.mjs +0 -1
- package/dist/_chunks/tr-fBBDNMBY.js +0 -1
- package/dist/_chunks/zh-BEh3jejH.mjs +0 -1
- package/dist/_chunks/zh-CyCKPuL0.js +0 -1
- package/dist/_chunks/zh-Hans-Btuz6Y7W.js +0 -1
- package/dist/_chunks/zh-Hans-CRQss50D.mjs +0 -1
- package/dist/admin/index.js +19 -13
- package/dist/admin/index.mjs +19 -13
- package/dist/server/index.js +10 -17
- package/dist/server/index.mjs +9 -15
- package/dist/server/src/services/builders/filters/content-type.d.ts.map +1 -1
- package/dist/server/src/services/builders/input.d.ts.map +1 -1
- package/package.json +10 -10
- package/dist/_chunks/dk-BbJCmDw6.mjs.map +0 -1
- package/dist/_chunks/dk-C9NcSzyg.js.map +0 -1
- package/dist/_chunks/en-BiKpmhCU.js.map +0 -1
- package/dist/_chunks/en-YIQYYlvv.mjs.map +0 -1
- package/dist/_chunks/es-BbsZ5Fh0.mjs.map +0 -1
- package/dist/_chunks/es-DE22V9D4.js.map +0 -1
- package/dist/_chunks/fr-BgqFw7G8.mjs.map +0 -1
- package/dist/_chunks/fr-Ca-HowfR.js.map +0 -1
- package/dist/_chunks/pl-CbET57Jb.mjs.map +0 -1
- package/dist/_chunks/pl-DVnJGR87.js.map +0 -1
- package/dist/_chunks/ru-BFz40YSA.mjs.map +0 -1
- package/dist/_chunks/ru-o4zaP02C.js.map +0 -1
- package/dist/_chunks/sv-9qK4y9fb.js.map +0 -1
- package/dist/_chunks/sv-CNYcKBn2.mjs.map +0 -1
- package/dist/_chunks/tr-H1PrR6RM.mjs.map +0 -1
- package/dist/_chunks/tr-fBBDNMBY.js.map +0 -1
- package/dist/_chunks/zh-BEh3jejH.mjs.map +0 -1
- package/dist/_chunks/zh-CyCKPuL0.js.map +0 -1
- package/dist/_chunks/zh-Hans-Btuz6Y7W.js.map +0 -1
- package/dist/_chunks/zh-Hans-CRQss50D.mjs.map +0 -1
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs.map +0 -1
- package/dist/server/index.js.map +0 -1
- package/dist/server/index.mjs.map +0 -1
package/dist/admin/index.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
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)(
|
|
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
18
|
const name$1 = "@strapi/plugin-graphql";
|
|
12
|
-
const version = "5.4.
|
|
19
|
+
const version = "5.4.2";
|
|
13
20
|
const description = "Adds GraphQL endpoint with default API methods.";
|
|
14
21
|
const repository = {
|
|
15
22
|
type: "git",
|
|
@@ -62,9 +69,9 @@ const dependencies = {
|
|
|
62
69
|
"@graphql-tools/schema": "10.0.3",
|
|
63
70
|
"@graphql-tools/utils": "^10.1.3",
|
|
64
71
|
"@koa/cors": "5.0.0",
|
|
65
|
-
"@strapi/design-system": "2.0.0-rc.
|
|
66
|
-
"@strapi/icons": "2.0.0-rc.
|
|
67
|
-
"@strapi/utils": "5.4.
|
|
72
|
+
"@strapi/design-system": "2.0.0-rc.14",
|
|
73
|
+
"@strapi/icons": "2.0.0-rc.14",
|
|
74
|
+
"@strapi/utils": "5.4.2",
|
|
68
75
|
graphql: "^16.8.1",
|
|
69
76
|
"graphql-depth-limit": "^1.1.0",
|
|
70
77
|
"graphql-playground-middleware-koa": "^1.6.21",
|
|
@@ -76,20 +83,20 @@ const dependencies = {
|
|
|
76
83
|
pluralize: "8.0.0"
|
|
77
84
|
};
|
|
78
85
|
const devDependencies = {
|
|
79
|
-
"@strapi/sdk-plugin": "^5.
|
|
80
|
-
"@strapi/strapi": "5.4.
|
|
81
|
-
"@strapi/types": "5.4.
|
|
86
|
+
"@strapi/sdk-plugin": "^5.2.0",
|
|
87
|
+
"@strapi/strapi": "5.4.2",
|
|
88
|
+
"@strapi/types": "5.4.2",
|
|
82
89
|
"@types/graphql-depth-limit": "1.1.5",
|
|
83
90
|
"@types/koa-bodyparser": "4.3.12",
|
|
84
91
|
"@types/koa__cors": "5.0.0",
|
|
85
92
|
"cross-env": "^7.0.3",
|
|
86
|
-
"eslint-config-custom": "5.4.
|
|
93
|
+
"eslint-config-custom": "5.4.2",
|
|
87
94
|
koa: "2.15.2",
|
|
88
95
|
react: "18.3.1",
|
|
89
96
|
"react-dom": "18.3.1",
|
|
90
97
|
"react-router-dom": "6.22.3",
|
|
91
98
|
"styled-components": "6.1.8",
|
|
92
|
-
tsconfig: "5.4.
|
|
99
|
+
tsconfig: "5.4.2",
|
|
93
100
|
typescript: "5.3.2"
|
|
94
101
|
};
|
|
95
102
|
const peerDependencies = {
|
|
@@ -149,7 +156,7 @@ const index = {
|
|
|
149
156
|
async registerTrads({ locales }) {
|
|
150
157
|
const importedTrads = await Promise.all(
|
|
151
158
|
locales.map((locale) => {
|
|
152
|
-
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
|
|
159
|
+
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 }) => {
|
|
153
160
|
return {
|
|
154
161
|
data: prefixPluginTranslations(data, pluginId),
|
|
155
162
|
locale
|
|
@@ -166,4 +173,3 @@ const index = {
|
|
|
166
173
|
}
|
|
167
174
|
};
|
|
168
175
|
module.exports = index;
|
|
169
|
-
//# sourceMappingURL=index.js.map
|
package/dist/admin/index.mjs
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
-
const __variableDynamicImportRuntimeHelper = (glob, path) => {
|
|
1
|
+
const __variableDynamicImportRuntimeHelper = (glob, path, segs) => {
|
|
2
2
|
const v = glob[path];
|
|
3
3
|
if (v) {
|
|
4
4
|
return typeof v === "function" ? v() : Promise.resolve(v);
|
|
5
5
|
}
|
|
6
6
|
return new Promise((_, reject) => {
|
|
7
|
-
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
7
|
+
(typeof queueMicrotask === "function" ? queueMicrotask : setTimeout)(
|
|
8
|
+
reject.bind(
|
|
9
|
+
null,
|
|
10
|
+
new Error(
|
|
11
|
+
"Unknown variable dynamic import: " + path + (path.split("/").length !== segs ? ". Note that variables only represent file names one level deep." : "")
|
|
12
|
+
)
|
|
13
|
+
)
|
|
14
|
+
);
|
|
8
15
|
});
|
|
9
16
|
};
|
|
10
17
|
const name$1 = "@strapi/plugin-graphql";
|
|
11
|
-
const version = "5.4.
|
|
18
|
+
const version = "5.4.2";
|
|
12
19
|
const description = "Adds GraphQL endpoint with default API methods.";
|
|
13
20
|
const repository = {
|
|
14
21
|
type: "git",
|
|
@@ -61,9 +68,9 @@ const dependencies = {
|
|
|
61
68
|
"@graphql-tools/schema": "10.0.3",
|
|
62
69
|
"@graphql-tools/utils": "^10.1.3",
|
|
63
70
|
"@koa/cors": "5.0.0",
|
|
64
|
-
"@strapi/design-system": "2.0.0-rc.
|
|
65
|
-
"@strapi/icons": "2.0.0-rc.
|
|
66
|
-
"@strapi/utils": "5.4.
|
|
71
|
+
"@strapi/design-system": "2.0.0-rc.14",
|
|
72
|
+
"@strapi/icons": "2.0.0-rc.14",
|
|
73
|
+
"@strapi/utils": "5.4.2",
|
|
67
74
|
graphql: "^16.8.1",
|
|
68
75
|
"graphql-depth-limit": "^1.1.0",
|
|
69
76
|
"graphql-playground-middleware-koa": "^1.6.21",
|
|
@@ -75,20 +82,20 @@ const dependencies = {
|
|
|
75
82
|
pluralize: "8.0.0"
|
|
76
83
|
};
|
|
77
84
|
const devDependencies = {
|
|
78
|
-
"@strapi/sdk-plugin": "^5.
|
|
79
|
-
"@strapi/strapi": "5.4.
|
|
80
|
-
"@strapi/types": "5.4.
|
|
85
|
+
"@strapi/sdk-plugin": "^5.2.0",
|
|
86
|
+
"@strapi/strapi": "5.4.2",
|
|
87
|
+
"@strapi/types": "5.4.2",
|
|
81
88
|
"@types/graphql-depth-limit": "1.1.5",
|
|
82
89
|
"@types/koa-bodyparser": "4.3.12",
|
|
83
90
|
"@types/koa__cors": "5.0.0",
|
|
84
91
|
"cross-env": "^7.0.3",
|
|
85
|
-
"eslint-config-custom": "5.4.
|
|
92
|
+
"eslint-config-custom": "5.4.2",
|
|
86
93
|
koa: "2.15.2",
|
|
87
94
|
react: "18.3.1",
|
|
88
95
|
"react-dom": "18.3.1",
|
|
89
96
|
"react-router-dom": "6.22.3",
|
|
90
97
|
"styled-components": "6.1.8",
|
|
91
|
-
tsconfig: "5.4.
|
|
98
|
+
tsconfig: "5.4.2",
|
|
92
99
|
typescript: "5.3.2"
|
|
93
100
|
};
|
|
94
101
|
const peerDependencies = {
|
|
@@ -148,7 +155,7 @@ const index = {
|
|
|
148
155
|
async registerTrads({ locales }) {
|
|
149
156
|
const importedTrads = await Promise.all(
|
|
150
157
|
locales.map((locale) => {
|
|
151
|
-
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
|
|
158
|
+
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 }) => {
|
|
152
159
|
return {
|
|
153
160
|
data: prefixPluginTranslations(data, pluginId),
|
|
154
161
|
locale
|
|
@@ -167,4 +174,3 @@ const index = {
|
|
|
167
174
|
export {
|
|
168
175
|
index as default
|
|
169
176
|
};
|
|
170
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/server/index.js
CHANGED
|
@@ -15,8 +15,7 @@ const pluralize = require("pluralize");
|
|
|
15
15
|
const graphqlScalars = require("graphql-scalars");
|
|
16
16
|
const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
|
|
17
17
|
function _interopNamespace(e) {
|
|
18
|
-
if (e && e.__esModule)
|
|
19
|
-
return e;
|
|
18
|
+
if (e && e.__esModule) return e;
|
|
20
19
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
21
20
|
if (e) {
|
|
22
21
|
for (const k in e) {
|
|
@@ -2242,10 +2241,8 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2242
2241
|
const { getFiltersInputTypeName } = utils2.naming;
|
|
2243
2242
|
const { isMorphRelation } = utils2.attributes;
|
|
2244
2243
|
const model = "target" in attribute && strapi2.getModel(attribute.target);
|
|
2245
|
-
if (!model || isMorphRelation(attribute))
|
|
2246
|
-
|
|
2247
|
-
if (extension.shadowCRUD(model.uid).isDisabled())
|
|
2248
|
-
return;
|
|
2244
|
+
if (!model || isMorphRelation(attribute)) return;
|
|
2245
|
+
if (extension.shadowCRUD(model.uid).isDisabled()) return;
|
|
2249
2246
|
builder.field(attributeName, { type: getFiltersInputTypeName(model) });
|
|
2250
2247
|
};
|
|
2251
2248
|
const addComponentAttribute = (builder, attributeName, attribute) => {
|
|
@@ -2253,10 +2250,8 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2253
2250
|
const extension = strapi2.plugin("graphql").service("extension");
|
|
2254
2251
|
const { getFiltersInputTypeName } = utils2.naming;
|
|
2255
2252
|
const component = strapi2.getModel(attribute.component);
|
|
2256
|
-
if (!component)
|
|
2257
|
-
|
|
2258
|
-
if (extension.shadowCRUD(component.uid).isDisabled())
|
|
2259
|
-
return;
|
|
2253
|
+
if (!component) return;
|
|
2254
|
+
if (extension.shadowCRUD(component.uid).isDisabled()) return;
|
|
2260
2255
|
builder.field(attributeName, { type: getFiltersInputTypeName(component) });
|
|
2261
2256
|
};
|
|
2262
2257
|
const buildContentTypeFilters = (contentType2) => {
|
|
@@ -2269,7 +2264,7 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2269
2264
|
return nexus.inputObjectType({
|
|
2270
2265
|
name: filtersTypeName,
|
|
2271
2266
|
definition(t) {
|
|
2272
|
-
const validAttributes = Object.entries(attributes2).filter(
|
|
2267
|
+
const validAttributes = Object.entries(attributes2).filter(([attributeName]) => !utils$2.contentTypes.isPrivateAttribute(contentType2, attributeName)).filter(
|
|
2273
2268
|
([attributeName]) => extension.shadowCRUD(contentType2.uid).field(attributeName).hasFiltersEnabeld()
|
|
2274
2269
|
);
|
|
2275
2270
|
const isIDFilterEnabled = extension.shadowCRUD(contentType2.uid).field("documentId").hasFiltersEnabeld();
|
|
@@ -2322,9 +2317,9 @@ const inputs = ({ strapi: strapi2 }) => {
|
|
|
2322
2317
|
const isFieldEnabled = (fieldName) => {
|
|
2323
2318
|
return extension.shadowCRUD(contentType2.uid).field(fieldName).hasInputEnabled();
|
|
2324
2319
|
};
|
|
2325
|
-
const validAttributes = Object.entries(attributes22).filter(
|
|
2326
|
-
|
|
2327
|
-
|
|
2320
|
+
const validAttributes = Object.entries(attributes22).filter(
|
|
2321
|
+
([attributeName]) => !utils$2.contentTypes.isPrivateAttribute(contentType2, attributeName)
|
|
2322
|
+
).filter(([attributeName]) => isWritableAttribute(contentType2, attributeName)).filter(([attributeName]) => isFieldEnabled(attributeName));
|
|
2328
2323
|
if (modelType === "component" && isFieldEnabled("id")) {
|
|
2329
2324
|
t.id("id");
|
|
2330
2325
|
}
|
|
@@ -2780,8 +2775,7 @@ const utils = ({ strapi: strapi2 }) => {
|
|
|
2780
2775
|
const { args: args2 } = getService("internals");
|
|
2781
2776
|
const { modelType } = contentType2;
|
|
2782
2777
|
if (modelType === "component") {
|
|
2783
|
-
if (!multiple)
|
|
2784
|
-
return {};
|
|
2778
|
+
if (!multiple) return {};
|
|
2785
2779
|
return {
|
|
2786
2780
|
filters: naming2.getFiltersInputTypeName(contentType2),
|
|
2787
2781
|
pagination: args2.PaginationArg,
|
|
@@ -3111,4 +3105,3 @@ const index = {
|
|
|
3111
3105
|
services
|
|
3112
3106
|
};
|
|
3113
3107
|
module.exports = index;
|
|
3114
|
-
//# sourceMappingURL=index.js.map
|
package/dist/server/index.mjs
CHANGED
|
@@ -2219,10 +2219,8 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2219
2219
|
const { getFiltersInputTypeName } = utils2.naming;
|
|
2220
2220
|
const { isMorphRelation } = utils2.attributes;
|
|
2221
2221
|
const model = "target" in attribute && strapi2.getModel(attribute.target);
|
|
2222
|
-
if (!model || isMorphRelation(attribute))
|
|
2223
|
-
|
|
2224
|
-
if (extension.shadowCRUD(model.uid).isDisabled())
|
|
2225
|
-
return;
|
|
2222
|
+
if (!model || isMorphRelation(attribute)) return;
|
|
2223
|
+
if (extension.shadowCRUD(model.uid).isDisabled()) return;
|
|
2226
2224
|
builder.field(attributeName, { type: getFiltersInputTypeName(model) });
|
|
2227
2225
|
};
|
|
2228
2226
|
const addComponentAttribute = (builder, attributeName, attribute) => {
|
|
@@ -2230,10 +2228,8 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2230
2228
|
const extension = strapi2.plugin("graphql").service("extension");
|
|
2231
2229
|
const { getFiltersInputTypeName } = utils2.naming;
|
|
2232
2230
|
const component = strapi2.getModel(attribute.component);
|
|
2233
|
-
if (!component)
|
|
2234
|
-
|
|
2235
|
-
if (extension.shadowCRUD(component.uid).isDisabled())
|
|
2236
|
-
return;
|
|
2231
|
+
if (!component) return;
|
|
2232
|
+
if (extension.shadowCRUD(component.uid).isDisabled()) return;
|
|
2237
2233
|
builder.field(attributeName, { type: getFiltersInputTypeName(component) });
|
|
2238
2234
|
};
|
|
2239
2235
|
const buildContentTypeFilters = (contentType2) => {
|
|
@@ -2246,7 +2242,7 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2246
2242
|
return inputObjectType({
|
|
2247
2243
|
name: filtersTypeName,
|
|
2248
2244
|
definition(t) {
|
|
2249
|
-
const validAttributes = Object.entries(attributes2).filter(
|
|
2245
|
+
const validAttributes = Object.entries(attributes2).filter(([attributeName]) => !contentTypes.isPrivateAttribute(contentType2, attributeName)).filter(
|
|
2250
2246
|
([attributeName]) => extension.shadowCRUD(contentType2.uid).field(attributeName).hasFiltersEnabeld()
|
|
2251
2247
|
);
|
|
2252
2248
|
const isIDFilterEnabled = extension.shadowCRUD(contentType2.uid).field("documentId").hasFiltersEnabeld();
|
|
@@ -2299,9 +2295,9 @@ const inputs = ({ strapi: strapi2 }) => {
|
|
|
2299
2295
|
const isFieldEnabled = (fieldName) => {
|
|
2300
2296
|
return extension.shadowCRUD(contentType2.uid).field(fieldName).hasInputEnabled();
|
|
2301
2297
|
};
|
|
2302
|
-
const validAttributes = Object.entries(attributes22).filter(
|
|
2303
|
-
|
|
2304
|
-
|
|
2298
|
+
const validAttributes = Object.entries(attributes22).filter(
|
|
2299
|
+
([attributeName]) => !contentTypes.isPrivateAttribute(contentType2, attributeName)
|
|
2300
|
+
).filter(([attributeName]) => isWritableAttribute(contentType2, attributeName)).filter(([attributeName]) => isFieldEnabled(attributeName));
|
|
2305
2301
|
if (modelType === "component" && isFieldEnabled("id")) {
|
|
2306
2302
|
t.id("id");
|
|
2307
2303
|
}
|
|
@@ -2757,8 +2753,7 @@ const utils = ({ strapi: strapi2 }) => {
|
|
|
2757
2753
|
const { args: args2 } = getService("internals");
|
|
2758
2754
|
const { modelType } = contentType2;
|
|
2759
2755
|
if (modelType === "component") {
|
|
2760
|
-
if (!multiple)
|
|
2761
|
-
return {};
|
|
2756
|
+
if (!multiple) return {};
|
|
2762
2757
|
return {
|
|
2763
2758
|
filters: naming2.getFiltersInputTypeName(contentType2),
|
|
2764
2759
|
pagination: args2.PaginationArg,
|
|
@@ -3090,4 +3085,3 @@ const index = {
|
|
|
3090
3085
|
export {
|
|
3091
3086
|
index as default
|
|
3092
3087
|
};
|
|
3093
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-type.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/builders/filters/content-type.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"content-type.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/builders/filters/content-type.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;qCAEf,OAAO;2CA6Da,OAAO,iBAAiB;;AA7DxE,wBA2HE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/builders/input.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;qCAIZ,OAAO;gCAkBH,OAAO,MAAM;;AAlB7C,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../server/src/services/builders/input.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;qCAIZ,OAAO;gCAkBH,OAAO,MAAM;;AAlB7C,wBAqHE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/plugin-graphql",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.5.0",
|
|
4
4
|
"description": "Adds GraphQL endpoint with default API methods.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"@graphql-tools/schema": "10.0.3",
|
|
54
54
|
"@graphql-tools/utils": "^10.1.3",
|
|
55
55
|
"@koa/cors": "5.0.0",
|
|
56
|
-
"@strapi/design-system": "2.0.0-rc.
|
|
57
|
-
"@strapi/icons": "2.0.0-rc.
|
|
58
|
-
"@strapi/utils": "5.
|
|
56
|
+
"@strapi/design-system": "2.0.0-rc.14",
|
|
57
|
+
"@strapi/icons": "2.0.0-rc.14",
|
|
58
|
+
"@strapi/utils": "5.5.0",
|
|
59
59
|
"graphql": "^16.8.1",
|
|
60
60
|
"graphql-depth-limit": "^1.1.0",
|
|
61
61
|
"graphql-playground-middleware-koa": "^1.6.21",
|
|
@@ -67,20 +67,20 @@
|
|
|
67
67
|
"pluralize": "8.0.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@strapi/sdk-plugin": "^5.
|
|
71
|
-
"@strapi/strapi": "5.
|
|
72
|
-
"@strapi/types": "5.
|
|
70
|
+
"@strapi/sdk-plugin": "^5.2.0",
|
|
71
|
+
"@strapi/strapi": "5.5.0",
|
|
72
|
+
"@strapi/types": "5.5.0",
|
|
73
73
|
"@types/graphql-depth-limit": "1.1.5",
|
|
74
74
|
"@types/koa-bodyparser": "4.3.12",
|
|
75
75
|
"@types/koa__cors": "5.0.0",
|
|
76
76
|
"cross-env": "^7.0.3",
|
|
77
|
-
"eslint-config-custom": "5.
|
|
77
|
+
"eslint-config-custom": "5.5.0",
|
|
78
78
|
"koa": "2.15.2",
|
|
79
79
|
"react": "18.3.1",
|
|
80
80
|
"react-dom": "18.3.1",
|
|
81
81
|
"react-router-dom": "6.22.3",
|
|
82
82
|
"styled-components": "6.1.8",
|
|
83
|
-
"tsconfig": "5.
|
|
83
|
+
"tsconfig": "5.5.0",
|
|
84
84
|
"typescript": "5.3.2"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"description": "Adds GraphQL endpoint with default API methods.",
|
|
101
101
|
"kind": "plugin"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "7d785703f52464577d077c4618cbe68b44f8a9cd"
|
|
104
104
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dk-BbJCmDw6.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dk-C9NcSzyg.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-BiKpmhCU.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en-YIQYYlvv.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es-BbsZ5Fh0.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es-DE22V9D4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fr-BgqFw7G8.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fr-Ca-HowfR.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl-CbET57Jb.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pl-DVnJGR87.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ru-BFz40YSA.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ru-o4zaP02C.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sv-9qK4y9fb.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sv-CNYcKBn2.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tr-H1PrR6RM.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tr-fBBDNMBY.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zh-BEh3jejH.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zh-CyCKPuL0.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zh-Hans-Btuz6Y7W.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"zh-Hans-CRQss50D.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/dist/admin/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../admin/src/pluginId.ts","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\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":["pluginId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACExB,MAAM,2BAA2B,CAAC,MAAmBA,cAAkC;AAIrF,SAAO,OAAO,KAAK,IAAI,EAAE,OAAO,CAAC,KAAK,YAAY;AAChD,QAAI,GAAGA,SAAQ,IAAI,OAAO,EAAE,IAAI,KAAK,OAAO;AACrC,W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AAAA,MAAA,CACJ;AAAA,IAAA;AAGI,WAAA,QAAQ,QAAQ,aAAa;AAAA,EACtC;AACF;;"}
|
package/dist/admin/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../admin/src/pluginId.ts","../../admin/src/utils/prefixPluginTranslations.ts","../../admin/src/index.ts"],"sourcesContent":["export const pluginId = 'graphql';\n","type TradOptions = Record<string, string>;\n\nconst prefixPluginTranslations = (trad: TradOptions, pluginId: string): TradOptions => {\n if (!pluginId) {\n throw new TypeError(\"pluginId can't be empty\");\n }\n return Object.keys(trad).reduce((acc, current) => {\n acc[`${pluginId}.${current}`] = trad[current];\n return acc;\n }, {} as TradOptions);\n};\n\nexport { prefixPluginTranslations };\n","import pluginPkg from '../../package.json';\n\nimport { pluginId } from './pluginId';\nimport { prefixPluginTranslations } from './utils/prefixPluginTranslations';\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":["pluginId"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAO,MAAM,WAAW;ACExB,MAAM,2BAA2B,CAAC,MAAmBA,cAAkC;AAIrF,SAAO,OAAO,KAAK,IAAI,EAAE,OAAO,CAAC,KAAK,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