25 Commits

Author SHA1 Message Date
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Convly
97254f8d42 Use strapi.config.get instead of process.env 2022-02-14 14:02:06 +01:00
Convly
974b33b336 Add dedicated configuration option for shouldGenerateArtifacts: generateArtifacts 2022-02-14 13:45:13 +01:00
Convly
ae7731ce31 Add configuration options to generate graphql schema + types 2022-02-14 11:01:24 +01:00
Convly
8270d9c7a4 Fix typo 2022-02-04 17:37:56 +01:00
Convly
fe4645c385 Allow SDL type definitions to beneficiate from Nexus types context & processing 2022-02-04 17:31:53 +01:00
derrickmehaffy
4dbb64e8a2 change default policies error
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
2022-01-03 06:25:18 -07:00
Convly
cf96129d7c Don't remove Subscription type if subscriptions are disabled 2021-11-12 10:05:11 +01:00
Convly
a7592e04a9 use default config instead of the dedicated service 2021-11-10 16:04:32 +01:00
Convly
69d8b20f1b Disable subscriptions by default, change how to handle the type in wrapResolvers 2021-11-10 11:18:35 +01:00
Convly
cf5e4078b5 Merge branch 'releases/v4' of github.com:strapi/strapi into v4/graphql-subscriptions 2021-11-08 17:35:36 +01:00
Alexandre Bodin
42b87679bb Refactor policies to have a consistent factory API like middlewares 2021-11-08 09:33:36 +01:00
Pierre Noël
c6a5a047d6 Merge branch 'releases/v4' into v4/error-handling 2021-11-05 10:40:11 +01:00
Jean-Sébastien Herbaux
7f285fb755
[V4] Enhanced sanitize & remove restricted relations from content API's payloads (#11411)
* Rework sanitizeEntity, first iteration

* remove console.log

* Remove useless comments

* Fix e2e tests

* Fix up user e2e test

* Fix remove-restricted-relations visitor

* Handle grapqhql resolver, prevent access to restricted relations

* Handle polymorphic relation in the related visitor

* Remove morph attribute if empty

* Use only the find action to check if the relation is allowed
2021-11-04 15:47:53 +01:00
Pierre Noël
b4c9ad0440 refacto graphql errors 2021-11-04 11:42:43 +01:00
Alexandre Bodin
c1aa57f436 Harmonize and make policies and middlwares more consistent 2021-10-05 10:43:24 +02:00
Convly
56032ffb48 Handle case where there are no subscription defined 2021-09-29 13:51:54 +02:00
Convly
96ac7e314b Handle subscriptions in wrapResolvers 2021-09-29 13:35:26 +02:00
Convly
6a0d3a859c Add RelationResponseCollection & fix pagination 2021-09-28 12:02:26 +02:00
Jean-Sébastien Herbaux
22a9cdb9e0
[V4] Fix GraphQL e2e tests (#11034) 2021-09-21 19:38:15 +02:00
Jean-Sébastien Herbaux
5a7a5dc987
[V4] GraphQL - Migrate Users & Permissions GraphQL config to V4 (#10979)
* Migrate UsersPermissions's GQL configuration to V4

* Remove old graphql configuration
2021-09-15 15:44:42 +02:00
Convly
9c48580991 Handle authorization for GraphQL queries & mutations 2021-09-13 10:48:26 +02:00
Jean-Sébastien Herbaux
37311b2757
[V4] GQL - Handle empty dynamic zone (#10926)
* Add an Error object type

* Fix typo in collection-type queries definition

* Add dynamic zone resolver

* Handle empty dynamic zone (no component attached)
2021-09-09 16:45:38 +02:00
Jean-Sébastien Herbaux
2b715a6ee9
V4/graphql configuration (#10896)
* Use a scalar to register the i18n locale arg

* Remove useless files & comments

* Use custom config for apollo server & the pagination (better handling of pagination)

* Fix missing strapi variable being transmitted to wrapResolvers/parseMiddlewares

* PR review comments
2021-09-07 11:23:49 +02:00
Jean-Sébastien Herbaux
357fd163b0
V4/graphql customization (#10850)
* Add basic implementation for the graphql extension service

* Add createPolicyContext in @strapi/utils

* policiesMiddleware implementation for graphql

* wrapResolvers first implementation (authentication, middlewares, policies)

* move the content API schema build from /generators to /content-api. Extract types' register functions into a dedicated folder

* fix schema generation on bootstrap

* update the graphql service file to match new services arch

* fix single type queries

* simplify entity's resolver

* use apollo graphql conventions for resolver's args naming

* use the graphql extension system in i18n to add a locale arg to localized queries & mutations
2021-09-01 12:06:51 +02:00