@strapi/plugin-graphql 5.14.0 → 5.15.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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var name = "@strapi/plugin-graphql";
6
- var version = "5.13.1";
6
+ var version = "5.15.0";
7
7
  var description = "Adds GraphQL endpoint with default API methods.";
8
8
  var repository = {
9
9
  type: "git",
@@ -60,9 +60,9 @@ var dependencies = {
60
60
  "@graphql-tools/schema": "10.0.3",
61
61
  "@graphql-tools/utils": "^10.1.3",
62
62
  "@koa/cors": "5.0.0",
63
- "@strapi/design-system": "2.0.0-rc.24",
64
- "@strapi/icons": "2.0.0-rc.24",
65
- "@strapi/utils": "5.13.1",
63
+ "@strapi/design-system": "2.0.0-rc.25",
64
+ "@strapi/icons": "2.0.0-rc.25",
65
+ "@strapi/utils": "5.15.0",
66
66
  graphql: "^16.8.1",
67
67
  "graphql-depth-limit": "^1.1.0",
68
68
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -74,19 +74,19 @@ var dependencies = {
74
74
  pluralize: "8.0.0"
75
75
  };
76
76
  var devDependencies = {
77
- "@strapi/strapi": "5.13.1",
78
- "@strapi/types": "5.13.1",
77
+ "@strapi/strapi": "5.15.0",
78
+ "@strapi/types": "5.15.0",
79
79
  "@types/graphql-depth-limit": "1.1.5",
80
80
  "@types/koa-bodyparser": "4.3.12",
81
81
  "@types/koa__cors": "5.0.0",
82
82
  "cross-env": "^7.0.3",
83
- "eslint-config-custom": "5.13.1",
84
- koa: "2.15.4",
83
+ "eslint-config-custom": "5.15.0",
84
+ koa: "2.16.1",
85
85
  react: "18.3.1",
86
86
  "react-dom": "18.3.1",
87
87
  "react-router-dom": "6.22.3",
88
88
  "styled-components": "6.1.8",
89
- tsconfig: "5.13.1",
89
+ tsconfig: "5.15.0",
90
90
  typescript: "5.4.4"
91
91
  };
92
92
  var peerDependencies = {
@@ -1,5 +1,5 @@
1
1
  var name = "@strapi/plugin-graphql";
2
- var version = "5.13.1";
2
+ var version = "5.15.0";
3
3
  var description = "Adds GraphQL endpoint with default API methods.";
4
4
  var repository = {
5
5
  type: "git",
@@ -56,9 +56,9 @@ var dependencies = {
56
56
  "@graphql-tools/schema": "10.0.3",
57
57
  "@graphql-tools/utils": "^10.1.3",
58
58
  "@koa/cors": "5.0.0",
59
- "@strapi/design-system": "2.0.0-rc.24",
60
- "@strapi/icons": "2.0.0-rc.24",
61
- "@strapi/utils": "5.13.1",
59
+ "@strapi/design-system": "2.0.0-rc.25",
60
+ "@strapi/icons": "2.0.0-rc.25",
61
+ "@strapi/utils": "5.15.0",
62
62
  graphql: "^16.8.1",
63
63
  "graphql-depth-limit": "^1.1.0",
64
64
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -70,19 +70,19 @@ var dependencies = {
70
70
  pluralize: "8.0.0"
71
71
  };
72
72
  var devDependencies = {
73
- "@strapi/strapi": "5.13.1",
74
- "@strapi/types": "5.13.1",
73
+ "@strapi/strapi": "5.15.0",
74
+ "@strapi/types": "5.15.0",
75
75
  "@types/graphql-depth-limit": "1.1.5",
76
76
  "@types/koa-bodyparser": "4.3.12",
77
77
  "@types/koa__cors": "5.0.0",
78
78
  "cross-env": "^7.0.3",
79
- "eslint-config-custom": "5.13.1",
80
- koa: "2.15.4",
79
+ "eslint-config-custom": "5.15.0",
80
+ koa: "2.16.1",
81
81
  react: "18.3.1",
82
82
  "react-dom": "18.3.1",
83
83
  "react-router-dom": "6.22.3",
84
84
  "styled-components": "6.1.8",
85
- tsconfig: "5.13.1",
85
+ tsconfig: "5.15.0",
86
86
  typescript: "5.4.4"
87
87
  };
88
88
  var peerDependencies = {
@@ -33,7 +33,16 @@ var associationResolvers = (({ strapi })=>{
33
33
  const sanitizedQuery = await strapi.contentAPI.sanitize.query(transformedArgs, targetContentType, {
34
34
  auth
35
35
  });
36
- const dbQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);
36
+ const transformedQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);
37
+ const defaultFilters = {
38
+ where: {
39
+ // Return the same draft and publish version as the parent
40
+ publishedAt: {
41
+ $notNull: 'publishedAt' in parent ? parent.publishedAt !== null : true
42
+ }
43
+ }
44
+ };
45
+ const dbQuery = fp.merge(defaultFilters, transformedQuery);
37
46
  const data = await strapi.db?.query(contentTypeUID).load(parent, attributeName, dbQuery);
38
47
  const info = {
39
48
  args: sanitizedQuery,
@@ -1 +1 @@
1
- {"version":3,"file":"association.js","sources":["../../../../../server/src/services/builders/resolvers/association.ts"],"sourcesContent":["import { get } from 'lodash/fp';\nimport { async, errors } from '@strapi/utils';\nimport type { Internal } from '@strapi/types';\n\nimport type { Context } from '../../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const { service: getGraphQLService } = strapi.plugin('graphql');\n\n const { isMorphRelation, isMedia } = getGraphQLService('utils').attributes;\n const { transformArgs } = getGraphQLService('builders').utils;\n const { toEntityResponse, toEntityResponseCollection } = getGraphQLService('format').returnTypes;\n\n return {\n buildAssociationResolver({\n contentTypeUID,\n attributeName,\n }: {\n contentTypeUID: Internal.UID.ContentType;\n attributeName: string;\n }) {\n const contentType = strapi.getModel(contentTypeUID);\n const attribute: any = contentType.attributes[attributeName];\n\n if (!attribute) {\n throw new ApplicationError(\n `Failed to build an association resolver for ${contentTypeUID}::${attributeName}`\n );\n }\n\n const isMediaAttribute = isMedia(attribute);\n const isMorphAttribute = isMorphRelation(attribute);\n\n const targetUID = isMediaAttribute ? 'plugin::upload.file' : attribute.target;\n const isToMany = isMediaAttribute ? attribute.multiple : attribute.relation.endsWith('Many');\n\n const targetContentType = strapi.getModel(targetUID);\n\n return async (parent: any, args: any = {}, context: any = {}) => {\n const { auth } = context.state;\n\n const transformedArgs = transformArgs(args, {\n contentType: targetContentType,\n usePagination: true,\n });\n\n await strapi.contentAPI.validate.query(transformedArgs, targetContentType, {\n auth,\n });\n\n const sanitizedQuery = await strapi.contentAPI.sanitize.query(\n transformedArgs,\n targetContentType,\n {\n auth,\n }\n );\n\n const dbQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);\n\n const data = await strapi.db?.query(contentTypeUID).load(parent, attributeName, dbQuery);\n\n const info = {\n args: sanitizedQuery,\n resourceUID: targetUID,\n };\n\n // If this a polymorphic association, it sanitizes & returns the raw data\n // Note: The value needs to be wrapped in a fake object that represents its parent\n // so that the sanitize util can work properly.\n if (isMorphAttribute) {\n // Helpers used for the data cleanup\n const wrapData = (dataToWrap: any) => ({ [attributeName]: dataToWrap });\n const sanitizeData = (dataToSanitize: any) => {\n return strapi.contentAPI.sanitize.output(dataToSanitize, contentType, { auth });\n };\n const unwrapData = get(attributeName);\n\n // Sanitizer definition\n const sanitizeMorphAttribute = async.pipe(wrapData, sanitizeData, unwrapData);\n\n return sanitizeMorphAttribute(data);\n }\n\n // If this is a to-many relation, it returns an object that\n // matches what the entity-response-collection's resolvers expect\n if (isToMany) {\n return toEntityResponseCollection(data, info);\n }\n\n // Else, it returns an object that matches\n // what the entity-response's resolvers expect\n return toEntityResponse(data, info);\n };\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","service","getGraphQLService","plugin","isMorphRelation","isMedia","attributes","transformArgs","utils","toEntityResponse","toEntityResponseCollection","returnTypes","buildAssociationResolver","contentTypeUID","attributeName","contentType","getModel","attribute","isMediaAttribute","isMorphAttribute","targetUID","target","isToMany","multiple","relation","endsWith","targetContentType","parent","args","context","auth","state","transformedArgs","usePagination","contentAPI","validate","query","sanitizedQuery","sanitize","dbQuery","get","transform","data","db","load","info","resourceUID","wrapData","dataToWrap","sanitizeData","dataToSanitize","output","unwrapData","sanitizeMorphAttribute","async","pipe"],"mappings":";;;;;AAMA,MAAM,EAAEA,gBAAgB,EAAE,GAAGC,YAAAA;AAE7B,2BAAe,CAAA,CAAC,EAAEC,MAAM,EAAW,GAAA;AACjC,IAAA,MAAM,EAAEC,OAASC,EAAAA,iBAAiB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AAAA,CAAAA;AAElE,oBAAA,OAAOC,sBAAuBX,CAAAA,IAAAA,CAAAA;AAChC;;;AAIA,gBAAA,IAAIpB,QAAU,EAAA;AACZ,oBAAA,OAAOZ,2BAA2BgC,IAAMG,EAAAA,IAAAA,CAAAA;AAC1C;;;AAIA,gBAAA,OAAOpC,iBAAiBiC,IAAMG,EAAAA,IAAAA,CAAAA;AAChC,aAAA;AACF;AACF,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"association.js","sources":["../../../../../server/src/services/builders/resolvers/association.ts"],"sourcesContent":["import { get, merge } from 'lodash/fp';\nimport { async, errors } from '@strapi/utils';\nimport type { Internal } from '@strapi/types';\n\nimport type { Context } from '../../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const { service: getGraphQLService } = strapi.plugin('graphql');\n\n const { isMorphRelation, isMedia } = getGraphQLService('utils').attributes;\n const { transformArgs } = getGraphQLService('builders').utils;\n const { toEntityResponse, toEntityResponseCollection } = getGraphQLService('format').returnTypes;\n\n return {\n buildAssociationResolver({\n contentTypeUID,\n attributeName,\n }: {\n contentTypeUID: Internal.UID.ContentType;\n attributeName: string;\n }) {\n const contentType = strapi.getModel(contentTypeUID);\n const attribute: any = contentType.attributes[attributeName];\n\n if (!attribute) {\n throw new ApplicationError(\n `Failed to build an association resolver for ${contentTypeUID}::${attributeName}`\n );\n }\n\n const isMediaAttribute = isMedia(attribute);\n const isMorphAttribute = isMorphRelation(attribute);\n\n const targetUID = isMediaAttribute ? 'plugin::upload.file' : attribute.target;\n const isToMany = isMediaAttribute ? attribute.multiple : attribute.relation.endsWith('Many');\n\n const targetContentType = strapi.getModel(targetUID);\n\n return async (parent: any, args: any = {}, context: any = {}) => {\n const { auth } = context.state;\n\n const transformedArgs = transformArgs(args, {\n contentType: targetContentType,\n usePagination: true,\n });\n\n await strapi.contentAPI.validate.query(transformedArgs, targetContentType, {\n auth,\n });\n\n const sanitizedQuery = await strapi.contentAPI.sanitize.query(\n transformedArgs,\n targetContentType,\n {\n auth,\n }\n );\n\n const transformedQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);\n\n const defaultFilters = {\n where: {\n // Return the same draft and publish version as the parent\n publishedAt: { $notNull: 'publishedAt' in parent ? parent.publishedAt !== null : true },\n },\n };\n const dbQuery = merge(defaultFilters, transformedQuery);\n const data = await strapi.db?.query(contentTypeUID).load(parent, attributeName, dbQuery);\n\n const info = {\n args: sanitizedQuery,\n resourceUID: targetUID,\n };\n\n // If this a polymorphic association, it sanitizes & returns the raw data\n // Note: The value needs to be wrapped in a fake object that represents its parent\n // so that the sanitize util can work properly.\n if (isMorphAttribute) {\n // Helpers used for the data cleanup\n const wrapData = (dataToWrap: any) => ({ [attributeName]: dataToWrap });\n const sanitizeData = (dataToSanitize: any) => {\n return strapi.contentAPI.sanitize.output(dataToSanitize, contentType, { auth });\n };\n const unwrapData = get(attributeName);\n\n // Sanitizer definition\n const sanitizeMorphAttribute = async.pipe(wrapData, sanitizeData, unwrapData);\n\n return sanitizeMorphAttribute(data);\n }\n\n // If this is a to-many relation, it returns an object that\n // matches what the entity-response-collection's resolvers expect\n if (isToMany) {\n return toEntityResponseCollection(data, info);\n }\n\n // Else, it returns an object that matches\n // what the entity-response's resolvers expect\n return toEntityResponse(data, info);\n };\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","service","getGraphQLService","plugin","isMorphRelation","isMedia","attributes","transformArgs","utils","toEntityResponse","toEntityResponseCollection","returnTypes","buildAssociationResolver","contentTypeUID","attributeName","contentType","getModel","attribute","isMediaAttribute","isMorphAttribute","targetUID","target","isToMany","multiple","relation","endsWith","targetContentType","parent","args","context","auth","state","transformedArgs","usePagination","contentAPI","validate","query","sanitizedQuery","sanitize","transformedQuery","get","transform","defaultFilters","where","publishedAt","$notNull","dbQuery","merge","data","db","load","info","resourceUID","wrapData","dataToWrap","sanitizeData","dataToSanitize","output","unwrapData","sanitizeMorphAttribute","async","pipe"],"mappings":";;;;;AAMA,MAAM,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AAAA,IAAqB;AAAE,4BAAA,CAACxC,gBAAgBwC;yBAAW,CAAA;AACrE,oBAAA,MAAMC,eAAe,CAACC,cAAAA,GAAAA;wBACpB,OAAOxD,MAAAA,CAAOkC,UAAU,CAACI,QAAQ,CAACmB,MAAM,CAACD,gBAAgBzC,WAAa,EAAA;AAAEe,4BAAAA;AAAK,yBAAA,CAAA;AAC/E,qBAAA;AACA,oBAAA,MAAM4B,aAAalB,MAAI1B,CAAAA,aAAAA,CAAAA;;AAGvB,oBAAA,MAAM6C,sBAAyBC,GAAAA,WAAAA,CAAMC,IAAI,CAACR,UAAUE,YAAcG,EAAAA,UAAAA,CAAAA;AAElE,oBAAA,OAAOC,sBAAuBX,CAAAA,IAAAA,CAAAA;AAChC;;;AAIA,gBAAA,IAAI1B,QAAU,EAAA;AACZ,oBAAA,OAAOZ,2BAA2BsC,IAAMG,EAAAA,IAAAA,CAAAA;AAC1C;;;AAIA,gBAAA,OAAO1C,iBAAiBuC,IAAMG,EAAAA,IAAAA,CAAAA;AAChC,aAAA;AACF;AACF,KAAA;AACF,CAAA;;;;"}
@@ -1,4 +1,4 @@
1
- import { get } from 'lodash/fp';
1
+ import { merge, get } from 'lodash/fp';
2
2
  import { async, errors } from '@strapi/utils';
3
3
 
4
4
  const { ApplicationError } = errors;
@@ -31,7 +31,16 @@ var associationResolvers = (({ strapi })=>{
31
31
  const sanitizedQuery = await strapi.contentAPI.sanitize.query(transformedArgs, targetContentType, {
32
32
  auth
33
33
  });
34
- const dbQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);
34
+ const transformedQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);
35
+ const defaultFilters = {
36
+ where: {
37
+ // Return the same draft and publish version as the parent
38
+ publishedAt: {
39
+ $notNull: 'publishedAt' in parent ? parent.publishedAt !== null : true
40
+ }
41
+ }
42
+ };
43
+ const dbQuery = merge(defaultFilters, transformedQuery);
35
44
  const data = await strapi.db?.query(contentTypeUID).load(parent, attributeName, dbQuery);
36
45
  const info = {
37
46
  args: sanitizedQuery,
@@ -1 +1 @@
1
- {"version":3,"file":"association.mjs","sources":["../../../../../server/src/services/builders/resolvers/association.ts"],"sourcesContent":["import { get } from 'lodash/fp';\nimport { async, errors } from '@strapi/utils';\nimport type { Internal } from '@strapi/types';\n\nimport type { Context } from '../../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const { service: getGraphQLService } = strapi.plugin('graphql');\n\n const { isMorphRelation, isMedia } = getGraphQLService('utils').attributes;\n const { transformArgs } = getGraphQLService('builders').utils;\n const { toEntityResponse, toEntityResponseCollection } = getGraphQLService('format').returnTypes;\n\n return {\n buildAssociationResolver({\n contentTypeUID,\n attributeName,\n }: {\n contentTypeUID: Internal.UID.ContentType;\n attributeName: string;\n }) {\n const contentType = strapi.getModel(contentTypeUID);\n const attribute: any = contentType.attributes[attributeName];\n\n if (!attribute) {\n throw new ApplicationError(\n `Failed to build an association resolver for ${contentTypeUID}::${attributeName}`\n );\n }\n\n const isMediaAttribute = isMedia(attribute);\n const isMorphAttribute = isMorphRelation(attribute);\n\n const targetUID = isMediaAttribute ? 'plugin::upload.file' : attribute.target;\n const isToMany = isMediaAttribute ? attribute.multiple : attribute.relation.endsWith('Many');\n\n const targetContentType = strapi.getModel(targetUID);\n\n return async (parent: any, args: any = {}, context: any = {}) => {\n const { auth } = context.state;\n\n const transformedArgs = transformArgs(args, {\n contentType: targetContentType,\n usePagination: true,\n });\n\n await strapi.contentAPI.validate.query(transformedArgs, targetContentType, {\n auth,\n });\n\n const sanitizedQuery = await strapi.contentAPI.sanitize.query(\n transformedArgs,\n targetContentType,\n {\n auth,\n }\n );\n\n const dbQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);\n\n const data = await strapi.db?.query(contentTypeUID).load(parent, attributeName, dbQuery);\n\n const info = {\n args: sanitizedQuery,\n resourceUID: targetUID,\n };\n\n // If this a polymorphic association, it sanitizes & returns the raw data\n // Note: The value needs to be wrapped in a fake object that represents its parent\n // so that the sanitize util can work properly.\n if (isMorphAttribute) {\n // Helpers used for the data cleanup\n const wrapData = (dataToWrap: any) => ({ [attributeName]: dataToWrap });\n const sanitizeData = (dataToSanitize: any) => {\n return strapi.contentAPI.sanitize.output(dataToSanitize, contentType, { auth });\n };\n const unwrapData = get(attributeName);\n\n // Sanitizer definition\n const sanitizeMorphAttribute = async.pipe(wrapData, sanitizeData, unwrapData);\n\n return sanitizeMorphAttribute(data);\n }\n\n // If this is a to-many relation, it returns an object that\n // matches what the entity-response-collection's resolvers expect\n if (isToMany) {\n return toEntityResponseCollection(data, info);\n }\n\n // Else, it returns an object that matches\n // what the entity-response's resolvers expect\n return toEntityResponse(data, info);\n };\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","service","getGraphQLService","plugin","isMorphRelation","isMedia","attributes","transformArgs","utils","toEntityResponse","toEntityResponseCollection","returnTypes","buildAssociationResolver","contentTypeUID","attributeName","contentType","getModel","attribute","isMediaAttribute","isMorphAttribute","targetUID","target","isToMany","multiple","relation","endsWith","targetContentType","parent","args","context","auth","state","transformedArgs","usePagination","contentAPI","validate","query","sanitizedQuery","sanitize","dbQuery","get","transform","data","db","load","info","resourceUID","wrapData","dataToWrap","sanitizeData","dataToSanitize","output","unwrapData","sanitizeMorphAttribute","async","pipe"],"mappings":";;;AAMA,MAAM,EAAEA,gBAAgB,EAAE,GAAGC,MAAAA;AAE7B,2BAAe,CAAA,CAAC,EAAEC,MAAM,EAAW,GAAA;AACjC,IAAA,MAAM,EAAEC,OAASC,EAAAA,iBAAiB,EAAE,GAAGF,MAAAA,CAAOG,MAAM,CAAC,SAAA,CAAA;IAErD,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAE,GAAGH,iBAAAA,CAAkB,SAASI,UAAU;AAC1E,IAAA,MAAM,EAAEC,aAAa,EAAE,GAAGL,iBAAAA,CAAkB,YAAYM,KAAK;IAC7D,MAAM,EAAEC,gBAAgB,EAAEC,0BAA0B,EAAE,GAAGR,iBAAAA,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AAA;;;;"}
1
+ {"version":3,"file":"association.mjs","sources":["../../../../../server/src/services/builders/resolvers/association.ts"],"sourcesContent":["import { get, merge } from 'lodash/fp';\nimport { async, errors } from '@strapi/utils';\nimport type { Internal } from '@strapi/types';\n\nimport type { Context } from '../../types';\n\nconst { ApplicationError } = errors;\n\nexport default ({ strapi }: Context) => {\n const { service: getGraphQLService } = strapi.plugin('graphql');\n\n const { isMorphRelation, isMedia } = getGraphQLService('utils').attributes;\n const { transformArgs } = getGraphQLService('builders').utils;\n const { toEntityResponse, toEntityResponseCollection } = getGraphQLService('format').returnTypes;\n\n return {\n buildAssociationResolver({\n contentTypeUID,\n attributeName,\n }: {\n contentTypeUID: Internal.UID.ContentType;\n attributeName: string;\n }) {\n const contentType = strapi.getModel(contentTypeUID);\n const attribute: any = contentType.attributes[attributeName];\n\n if (!attribute) {\n throw new ApplicationError(\n `Failed to build an association resolver for ${contentTypeUID}::${attributeName}`\n );\n }\n\n const isMediaAttribute = isMedia(attribute);\n const isMorphAttribute = isMorphRelation(attribute);\n\n const targetUID = isMediaAttribute ? 'plugin::upload.file' : attribute.target;\n const isToMany = isMediaAttribute ? attribute.multiple : attribute.relation.endsWith('Many');\n\n const targetContentType = strapi.getModel(targetUID);\n\n return async (parent: any, args: any = {}, context: any = {}) => {\n const { auth } = context.state;\n\n const transformedArgs = transformArgs(args, {\n contentType: targetContentType,\n usePagination: true,\n });\n\n await strapi.contentAPI.validate.query(transformedArgs, targetContentType, {\n auth,\n });\n\n const sanitizedQuery = await strapi.contentAPI.sanitize.query(\n transformedArgs,\n targetContentType,\n {\n auth,\n }\n );\n\n const transformedQuery = strapi.get('query-params').transform(targetUID, sanitizedQuery);\n\n const defaultFilters = {\n where: {\n // Return the same draft and publish version as the parent\n publishedAt: { $notNull: 'publishedAt' in parent ? parent.publishedAt !== null : true },\n },\n };\n const dbQuery = merge(defaultFilters, transformedQuery);\n const data = await strapi.db?.query(contentTypeUID).load(parent, attributeName, dbQuery);\n\n const info = {\n args: sanitizedQuery,\n resourceUID: targetUID,\n };\n\n // If this a polymorphic association, it sanitizes & returns the raw data\n // Note: The value needs to be wrapped in a fake object that represents its parent\n // so that the sanitize util can work properly.\n if (isMorphAttribute) {\n // Helpers used for the data cleanup\n const wrapData = (dataToWrap: any) => ({ [attributeName]: dataToWrap });\n const sanitizeData = (dataToSanitize: any) => {\n return strapi.contentAPI.sanitize.output(dataToSanitize, contentType, { auth });\n };\n const unwrapData = get(attributeName);\n\n // Sanitizer definition\n const sanitizeMorphAttribute = async.pipe(wrapData, sanitizeData, unwrapData);\n\n return sanitizeMorphAttribute(data);\n }\n\n // If this is a to-many relation, it returns an object that\n // matches what the entity-response-collection's resolvers expect\n if (isToMany) {\n return toEntityResponseCollection(data, info);\n }\n\n // Else, it returns an object that matches\n // what the entity-response's resolvers expect\n return toEntityResponse(data, info);\n };\n },\n };\n};\n"],"names":["ApplicationError","errors","strapi","service","getGraphQLService","plugin","isMorphRelation","isMedia","attributes","transformArgs","utils","toEntityResponse","toEntityResponseCollection","returnTypes","buildAssociationResolver","contentTypeUID","attributeName","contentType","getModel","attribute","isMediaAttribute","isMorphAttribute","targetUID","target","isToMany","multiple","relation","endsWith","targetContentType","parent","args","context","auth","state","transformedArgs","usePagination","contentAPI","validate","query","sanitizedQuery","sanitize","transformedQuery","get","transform","defaultFilters","where","publishedAt","$notNull","dbQuery","merge","data","db","load","info","resourceUID","wrapData","dataToWrap","sanitizeData","dataToSanitize","output","unwrapData","sanitizeMorphAttribute","async","pipe"],"mappings":";;;AAMA,MAAM,EAAEA,gBAAgB,EAAE,GAAGC,MAAAA;AAE7B,2BAAe,CAAA,CAAC,EAAEC,MAAM,EAAW,GAAA;AACjC,IAAA,MAAM,EAAEC,OAASC,EAAAA,iBAAiB,EAAE,GAAGF,MAAAA,CAAOG,MAAM,CAAC,SAAA,CAAA;IAErD,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAE,GAAGH,iBAAAA,CAAkB,SAASI,UAAU;AAC1E,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,GAAI1B,CAAAA,aAAAA,CAAAA;;AAGvB,oBAAA,MAAM6C,sBAAyBC,GAAAA,KAAAA,CAAMC,IAAI,CAACR,UAAUE,YAAcG,EAAAA,UAAAA,CAAAA;AAElE,oBAAA,OAAOC,sBAAuBX,CAAAA,IAAAA,CAAAA;AAChC;;;AAIA,gBAAA,IAAI1B,QAAU,EAAA;AACZ,oBAAA,OAAOZ,2BAA2BsC,IAAMG,EAAAA,IAAAA,CAAAA;AAC1C;;;AAIA,gBAAA,OAAO1C,iBAAiBuC,IAAMG,EAAAA,IAAAA,CAAAA;AAChC,aAAA;AACF;AACF,KAAA;AACF,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/builders/resolvers/association.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;qCAIf,OAAO;iEAW5B;QACD,cAAc,EAAE,SAAS,GAAG,CAAC,WAAW,CAAC;QACzC,aAAa,EAAE,MAAM,CAAC;KACvB,YAkBuB,GAAG,SAAQ,GAAG,YAAgB,GAAG;;AAhC7D,wBA0FE"}
1
+ {"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../../../../../server/src/services/builders/resolvers/association.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;qCAIf,OAAO;iEAW5B;QACD,cAAc,EAAE,SAAS,GAAG,CAAC,WAAW,CAAC;QACzC,aAAa,EAAE,MAAM,CAAC;KACvB,YAkBuB,GAAG,SAAQ,GAAG,YAAgB,GAAG;;AAhC7D,wBAiGE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-graphql",
3
- "version": "5.14.0",
3
+ "version": "5.15.1",
4
4
  "description": "Adds GraphQL endpoint with default API methods.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,9 +57,9 @@
57
57
  "@graphql-tools/schema": "10.0.3",
58
58
  "@graphql-tools/utils": "^10.1.3",
59
59
  "@koa/cors": "5.0.0",
60
- "@strapi/design-system": "2.0.0-rc.24",
61
- "@strapi/icons": "2.0.0-rc.24",
62
- "@strapi/utils": "5.14.0",
60
+ "@strapi/design-system": "2.0.0-rc.25",
61
+ "@strapi/icons": "2.0.0-rc.25",
62
+ "@strapi/utils": "5.15.1",
63
63
  "graphql": "^16.8.1",
64
64
  "graphql-depth-limit": "^1.1.0",
65
65
  "graphql-playground-middleware-koa": "^1.6.21",
@@ -71,19 +71,19 @@
71
71
  "pluralize": "8.0.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@strapi/strapi": "5.14.0",
75
- "@strapi/types": "5.14.0",
74
+ "@strapi/strapi": "5.15.1",
75
+ "@strapi/types": "5.15.1",
76
76
  "@types/graphql-depth-limit": "1.1.5",
77
77
  "@types/koa-bodyparser": "4.3.12",
78
78
  "@types/koa__cors": "5.0.0",
79
79
  "cross-env": "^7.0.3",
80
- "eslint-config-custom": "5.14.0",
81
- "koa": "2.15.4",
80
+ "eslint-config-custom": "5.15.1",
81
+ "koa": "2.16.1",
82
82
  "react": "18.3.1",
83
83
  "react-dom": "18.3.1",
84
84
  "react-router-dom": "6.22.3",
85
85
  "styled-components": "6.1.8",
86
- "tsconfig": "5.14.0",
86
+ "tsconfig": "5.15.1",
87
87
  "typescript": "5.4.4"
88
88
  },
89
89
  "peerDependencies": {