57 Commits

Author SHA1 Message Date
Alexandre Bodin
8819379e30 Revert other issue 2023-03-15 19:41:35 +01:00
Ben Irvin
801e3db415 add traverse query
fix single type

fix query

sanitize pagination count params

add comments

Cleanup the params/filters sanitize helpers

sanitize association resolver

Sanitize sort

fix graphql single type

fix graphql types

fix addFindQuery

Sanitize fields

Update sanitize sort to handle all the different formats

Update fields sanitize to handle regular strings & wildcard

Fix non scalar recursion

Add a traverse factory

Add visitor to remove dz & morph relations

Replace the old traverse utils (sort, filters) by one created using the traverse factory

add sanitize populate

await args

fix async and duplicate sanitization

sanitize u&p params

Add traverse fields

Fix traverse & sanitize fields

add traverse fields to nested populate

sanitize admin api filter queries

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

sanitize sort params in admin API

todo

make token fields unsearchable with _q

sanitize delete mutation

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

fix errors on queries without ctx

rename findParams to sanitizedParams

Sanitize queries everywhere in the content manager admin controllers

sanitize single type update and delete

Ignore non attribute keys in the sanitize sort

Fix the sanitize query sort for nested string sort

Fix permission check for the admin

typo

sanitize upload

sanitize admin media library

sanitize admin users

Add missing await

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

set U&P users fields to searchable:false

add token support to createContentAPIRequest

add searchable:false to getstarted U&P schema

remove comment

sanitize component resolver

remove await

add searchable false to the file's folder path

Fix admin query when the permission query is set to null

add basic tests for filtering private params

add tests for fields

add pagination tests

Fix admin user fields not being sanitized

Fix convert query params for the morph fragment on undefined value

Traverse dynamic zone on nested populate

Handle nested sort, filters & fields in populate queries + handle populate fragment for morphTo relations

Sanitize 'on' subpopulate

Co-authored-by: Jean-Sébastien Herbaux <Convly@users.noreply.github.com>

don't throw error on invalid attributes

check models for snake case column name instead of assuming they are operators

Add first batch of api tests for params sanitize

Fix sort traversal: handle object arrays

Put back removePassword for fields,sort,filters

Add schemas and fixtures for sanitize api tests

Add tests for relations (sanitize api tests)

Move constant to domain scope

Rename sanitize params to sanitize query

Fix typo

Cleanup fixtures file

Fix variable name conflict

Update packages/core/admin/server/services/permission/permissions-manager/sanitize.js

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>

Update comment for array filters

Rename sanitize test

Test implicit & explicit array operator for filter

Remove unused code
2023-03-15 14:59:19 +01:00
Ben Irvin
8047092979 make id arg required in singular content type graphql request 2023-02-22 10:52:45 +01:00
Christian Capeans
2a23b26dcb Fix the findParams argument to be passed correctly 2022-11-04 14:28:28 +01:00
Alexandre Bodin
cf49ddbbfc Prettier and backend fix 2022-08-11 10:20:49 +02:00
Alexandre Bodin
0ae14c06cb 1st fix pass 2022-08-11 10:20:48 +02:00
Pierre Noël
952bca2dce better handle populating dz 2022-07-26 17:13:59 +02:00
Alexandre BODIN
bc60b90b9e
Merge pull request #13578 from meherchandan/fix/case-insensitive-equal-filter
fix: added new eqi operator for case insensitive equal search
2022-07-21 15:53:25 +02:00
meherchandan
a7131ca000 fix: review comments and added graphql operator 2022-07-12 16:19:51 +04:00
Convly
38e29b7110 fix style 2022-06-16 13:00:41 +02:00
Convly
34bb591cea Enable filtering on nested components 2022-06-16 10:21:03 +02:00
Gustav Hansen
8aaaff77d4 Chore: Prettify all files 2022-03-29 14:20:41 +02:00
Pierre Noël
c0fb7619ef rename toGraphQLName + check enum values don't start with a number 2022-03-03 16:35:41 +01:00
Pierre Noël
e85cfe73f0 allow special characters in an enum 2022-03-03 16:35:41 +01:00
harimkims
f91376c407 Remove console.log
Signed-off-by: harimkims <harimkims@gmail.com>
2021-12-23 11:44:40 +09:00
harimkims
780247117f Fix GraphQL enums are genereated as String type
Signed-off-by: harimkims <harimkims@gmail.com>
2021-12-23 10:59:24 +09:00
Convly
6b2ea4039f Fix image querying in graphql relations 2021-11-24 16:19:50 +01:00
Alexandre BODIN
85884e42e4
Merge pull request #11630 from strapi/v4/graphql-only-register-writable-attributes-to-inputs
[V4] GraphQL - Only keep writable attributes in input types
2021-11-19 09:47:02 +01:00
Convly
7716baa483 Use isWritableAttribute from contentTypes utils 2021-11-18 17:15:33 +01:00
Convly
d9dd66de4d Only register writable attributes in input types 2021-11-18 16:36:29 +01:00
Convly
4a2f331120 Use getModel instead of contentTypes[] to handle both content types & components in components resolvers 2021-11-18 16:20:08 +01:00
Convly
f4bc56b1af Remove manually added timestamps from graphql types definition 2021-11-16 14:04:57 +01:00
Alexandre BODIN
6d18f8c15c
Merge pull request #11580 from strapi/v4/graphql-fix-component-filtering
[V4] GraphQL - Fix components' filtering
2021-11-16 11:07:26 +01:00
Convly
44aabde4dd Fix component filtering 2021-11-15 18:12:06 +01:00
Convly
09aaa1202e Merge branch 'releases/v4' of github.com:strapi/strapi into v4/graphql-add-id-filter-ct 2021-11-15 15:53:38 +01:00
Convly
ad8a5e7634 Handle case where the filter is manually disabled 2021-11-12 15:15:41 +01:00
Convly
bac9e8145e Add an ID filter to the collection type's args 2021-11-12 15:07:32 +01:00
Alexandre BODIN
f4facb654b
Merge pull request #11475 from strapi/v4/new-sanitize-fixes
[V4] Enhancements for the new sanitize processes
2021-11-12 14:52:47 +01:00
Convly
da41a49612 Use config module instead 2021-11-12 10:07:08 +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
16ab717fb2 Merge branch 'releases/v4' of github.com:strapi/strapi into v4/new-sanitize-fixes 2021-11-08 15:53:58 +01:00
Pierre Noël
c6a5a047d6 Merge branch 'releases/v4' into v4/error-handling 2021-11-05 10:40:11 +01:00
Convly
d6516116b2 Move pipeAsync to @strapi/utils 2021-11-04 16:43:27 +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
f55276cc73 Merge branch 'releases/v4' into v4/ds-migration 2021-09-28 18:21:21 +02:00
Convly
9276479f72 Enable inplace updates for components 2021-09-28 14:59:14 +02:00
Convly
6a0d3a859c Add RelationResponseCollection & fix pagination 2021-09-28 12:02:26 +02:00
Convly
20b20a0f92 Fix e2e test for UP, i18n & upload + various i18n fixes 2021-09-27 17:17:24 +02:00
Convly
33a822a347 Fix ignored pagination for associations (gql) 2021-09-24 16:31:57 +02:00
Convly
892c0dc300 Fix broken lint 2021-09-23 18:13:06 +02:00
Convly
4737eff9f9 Fix PR review comments 2021-09-23 17:25:25 +02:00
Convly
fa7467dbf8 Remove typo 2021-09-23 16:35:59 +02:00
Convly
9718ce1c52 Fix lint issues 2021-09-23 14:26:31 +02:00
Convly
c31478b01d Add possibility to disable fields in the graphql shadow crud 2021-09-22 16:52:45 +02:00
Convly
c38b1a0de9 integrate with new entity service params 2021-09-22 15:15:03 +02:00
Convly
6415624168 Use format services for return types in queries & mutationsé 2021-09-22 14:39:36 +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