@strapi/plugin-graphql 4.26.1 → 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.
- package/dist/_chunks/{dk-KmLnUoJC.mjs → dk-BbJCmDw6.mjs} +1 -1
- package/dist/_chunks/dk-BbJCmDw6.mjs.map +1 -0
- package/dist/_chunks/{dk-SLrLqAtl.js → dk-C9NcSzyg.js} +1 -1
- package/dist/_chunks/dk-C9NcSzyg.js.map +1 -0
- package/dist/_chunks/{en-WmmC2MW8.js → en-BiKpmhCU.js} +1 -1
- package/dist/_chunks/en-BiKpmhCU.js.map +1 -0
- package/dist/_chunks/{en-A16mqbIV.mjs → en-YIQYYlvv.mjs} +1 -1
- package/dist/_chunks/en-YIQYYlvv.mjs.map +1 -0
- package/dist/_chunks/{es-_xZ14QXK.mjs → es-BbsZ5Fh0.mjs} +1 -1
- package/dist/_chunks/es-BbsZ5Fh0.mjs.map +1 -0
- package/dist/_chunks/{es-4tl6ikyU.js → es-DE22V9D4.js} +1 -1
- package/dist/_chunks/es-DE22V9D4.js.map +1 -0
- package/dist/_chunks/{fr-4BkQ-Qvt.mjs → fr-BgqFw7G8.mjs} +1 -1
- package/dist/_chunks/fr-BgqFw7G8.mjs.map +1 -0
- package/dist/_chunks/{fr-cJXSt55N.js → fr-Ca-HowfR.js} +1 -1
- package/dist/_chunks/fr-Ca-HowfR.js.map +1 -0
- package/dist/_chunks/{pl-TWurBBP_.mjs → pl-CbET57Jb.mjs} +1 -1
- package/dist/_chunks/pl-CbET57Jb.mjs.map +1 -0
- package/dist/_chunks/{pl-wKw9Xgkw.js → pl-DVnJGR87.js} +1 -1
- package/dist/_chunks/pl-DVnJGR87.js.map +1 -0
- package/dist/_chunks/{ru-aD804UEo.mjs → ru-BFz40YSA.mjs} +1 -1
- package/dist/_chunks/ru-BFz40YSA.mjs.map +1 -0
- package/dist/_chunks/{ru-CYAnXR6L.js → ru-o4zaP02C.js} +1 -1
- package/dist/_chunks/ru-o4zaP02C.js.map +1 -0
- package/dist/_chunks/{sv-XNOe1ctV.js → sv-9qK4y9fb.js} +1 -1
- package/dist/_chunks/sv-9qK4y9fb.js.map +1 -0
- package/dist/_chunks/{sv-N5RufX6w.mjs → sv-CNYcKBn2.mjs} +1 -1
- package/dist/_chunks/sv-CNYcKBn2.mjs.map +1 -0
- package/dist/_chunks/{tr-UmSHgD8y.mjs → tr-H1PrR6RM.mjs} +1 -1
- package/dist/_chunks/tr-H1PrR6RM.mjs.map +1 -0
- package/dist/_chunks/{tr-POFbAHUC.js → tr-fBBDNMBY.js} +1 -1
- package/dist/_chunks/tr-fBBDNMBY.js.map +1 -0
- package/dist/_chunks/{zh-KvwXXMnA.mjs → zh-BEh3jejH.mjs} +1 -1
- package/dist/_chunks/zh-BEh3jejH.mjs.map +1 -0
- package/dist/_chunks/{zh-kJ_DkSIe.js → zh-CyCKPuL0.js} +1 -1
- package/dist/_chunks/zh-CyCKPuL0.js.map +1 -0
- package/dist/_chunks/{zh-Hans-pnigVFnS.js → zh-Hans-Btuz6Y7W.js} +1 -1
- package/dist/_chunks/zh-Hans-Btuz6Y7W.js.map +1 -0
- package/dist/_chunks/{zh-Hans-ClgXy4wM.mjs → zh-Hans-CRQss50D.mjs} +1 -1
- package/dist/_chunks/zh-Hans-CRQss50D.mjs.map +1 -0
- package/dist/admin/index.js +11 -114
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +11 -114
- package/dist/admin/index.mjs.map +1 -1
- package/dist/server/index.js +7 -14
- package/dist/server/index.js.map +1 -1
- package/dist/server/index.mjs +8 -14
- package/dist/server/index.mjs.map +1 -1
- package/package.json +13 -13
- package/dist/_chunks/dk-KmLnUoJC.mjs.map +0 -1
- package/dist/_chunks/dk-SLrLqAtl.js.map +0 -1
- package/dist/_chunks/en-A16mqbIV.mjs.map +0 -1
- package/dist/_chunks/en-WmmC2MW8.js.map +0 -1
- package/dist/_chunks/es-4tl6ikyU.js.map +0 -1
- package/dist/_chunks/es-_xZ14QXK.mjs.map +0 -1
- package/dist/_chunks/fr-4BkQ-Qvt.mjs.map +0 -1
- package/dist/_chunks/fr-cJXSt55N.js.map +0 -1
- package/dist/_chunks/pl-TWurBBP_.mjs.map +0 -1
- package/dist/_chunks/pl-wKw9Xgkw.js.map +0 -1
- package/dist/_chunks/ru-CYAnXR6L.js.map +0 -1
- package/dist/_chunks/ru-aD804UEo.mjs.map +0 -1
- package/dist/_chunks/sv-N5RufX6w.mjs.map +0 -1
- package/dist/_chunks/sv-XNOe1ctV.js.map +0 -1
- package/dist/_chunks/tr-POFbAHUC.js.map +0 -1
- package/dist/_chunks/tr-UmSHgD8y.mjs.map +0 -1
- package/dist/_chunks/zh-Hans-ClgXy4wM.mjs.map +0 -1
- package/dist/_chunks/zh-Hans-pnigVFnS.js.map +0 -1
- package/dist/_chunks/zh-KvwXXMnA.mjs.map +0 -1
- package/dist/_chunks/zh-kJ_DkSIe.js.map +0 -1
package/dist/server/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isEmpty, toUpper, snakeCase,
|
|
1
|
+
import { isEmpty, pick, toUpper, snakeCase, mergeWith, isArray, propOr, get, getOr, first, isFunction, isNil, prop, startsWith, difference, propEq, isDate, isObject, has, mapValues, map, upperFirst, camelCase, pipe, lowerFirst, set, omit, identity, constant, isUndefined, isString, defaultTo, entries, reduce, merge as merge$1 } from "lodash/fp";
|
|
2
2
|
import { ForbiddenError as ForbiddenError$2, UserInputError, ApolloError, ApolloServer } from "apollo-server-koa";
|
|
3
3
|
import { ApolloServerPluginLandingPageDisabled, ApolloServerPluginLandingPageGraphQLPlayground } from "apollo-server-core";
|
|
4
4
|
import depthLimit from "graphql-depth-limit";
|
|
@@ -9,7 +9,7 @@ import { pruneSchema } from "@graphql-tools/utils";
|
|
|
9
9
|
import * as nexus from "nexus";
|
|
10
10
|
import { unionType, makeSchema, arg, list, inputObjectType, asNexusMethod, objectType, enumType, scalarType, nonNull, extendType } from "nexus";
|
|
11
11
|
import { singular } from "pluralize";
|
|
12
|
-
import { GraphQLDate,
|
|
12
|
+
import { GraphQLDate, GraphQLLong, GraphQLDateTime, GraphQLJSON } from "graphql-scalars";
|
|
13
13
|
const defaultConfig = {
|
|
14
14
|
shadowCRUD: true,
|
|
15
15
|
endpoint: "/graphql",
|
|
@@ -1604,8 +1604,7 @@ const typeBuilder = (context) => {
|
|
|
1604
1604
|
builder,
|
|
1605
1605
|
attributeName,
|
|
1606
1606
|
attribute,
|
|
1607
|
-
contentType: contentType2
|
|
1608
|
-
context
|
|
1607
|
+
contentType: contentType2
|
|
1609
1608
|
};
|
|
1610
1609
|
if (isEnumeration(attribute)) {
|
|
1611
1610
|
addEnumAttribute(options);
|
|
@@ -2072,10 +2071,8 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2072
2071
|
const { getFiltersInputTypeName } = utils2.naming;
|
|
2073
2072
|
const { isMorphRelation } = utils2.attributes;
|
|
2074
2073
|
const model = "target" in attribute && strapi2.getModel(attribute.target);
|
|
2075
|
-
if (!model || isMorphRelation(attribute))
|
|
2076
|
-
|
|
2077
|
-
if (extension.shadowCRUD(model.uid).isDisabled())
|
|
2078
|
-
return;
|
|
2074
|
+
if (!model || isMorphRelation(attribute)) return;
|
|
2075
|
+
if (extension.shadowCRUD(model.uid).isDisabled()) return;
|
|
2079
2076
|
builder.field(attributeName, { type: getFiltersInputTypeName(model) });
|
|
2080
2077
|
};
|
|
2081
2078
|
const addComponentAttribute = (builder, attributeName, attribute) => {
|
|
@@ -2083,10 +2080,8 @@ const contentType = ({ strapi: strapi2 }) => {
|
|
|
2083
2080
|
const extension = strapi2.plugin("graphql").service("extension");
|
|
2084
2081
|
const { getFiltersInputTypeName } = utils2.naming;
|
|
2085
2082
|
const component = strapi2.getModel(attribute.component);
|
|
2086
|
-
if (!component)
|
|
2087
|
-
|
|
2088
|
-
if (extension.shadowCRUD(component.uid).isDisabled())
|
|
2089
|
-
return;
|
|
2083
|
+
if (!component) return;
|
|
2084
|
+
if (extension.shadowCRUD(component.uid).isDisabled()) return;
|
|
2090
2085
|
builder.field(attributeName, { type: getFiltersInputTypeName(component) });
|
|
2091
2086
|
};
|
|
2092
2087
|
const buildContentTypeFilters = (contentType2) => {
|
|
@@ -2612,8 +2607,7 @@ const utils = ({ strapi: strapi2 }) => {
|
|
|
2612
2607
|
const { args: args2 } = getService("internals");
|
|
2613
2608
|
const { modelType } = contentType2;
|
|
2614
2609
|
if (modelType === "component") {
|
|
2615
|
-
if (!multiple)
|
|
2616
|
-
return {};
|
|
2610
|
+
if (!multiple) return {};
|
|
2617
2611
|
return {
|
|
2618
2612
|
filters: naming2.getFiltersInputTypeName(contentType2),
|
|
2619
2613
|
pagination: args2.PaginationArg,
|