4 Commits

Author SHA1 Message Date
Ralph
81a9a63cad
GraphQL Plugin (bug): Content type's attributes marked as private are being exposed in the exported GraphQL schema (#9805)
* Fixes #9804

* Fixes isPrivateAttribute function in strapi utils to take into account the private property within an attribute

* removing comment

* removing isNotPrivate function + adding call to already existing isPrivateAttribute function instead of isNotPrivate

* isPrivateAttribute fixed based on coments from Alexandre and confirmed that the model does indeed contain all private fields in an array at startup time

* removing isNotPrivate function and fixing generateEnumDefinitions to use the already available isPrivateAttribute function

* checking if created_at and update_at are also marked as private and if this is the case then hiding them

* allowIds by default when generating the input model to see if the tests will pass

* moving allowIds back to false by default

* adding isTypeAttributeEnabled function to check if a type attribute has been disabled and remove it from the exported graphql schema

* removing unused var

* only using isTypeAttributeEnabled instead of isPrivateAttribute.

* adding isPrivateAttribute at association level

* Adding isNotPrivate back together with isTypeAttributeEnabled

* adding unit test for removing a disabled attribute from a graphql schema

* renaming person to player in the test model

* Deleting the file as it has been renamed in the strapi master branch

* fixing lint issues

* fixing some lint issues

* adding isTypeAttributeEnabled support

* adding enumeration field in graphql

* adding use strict; to test file

* fixing test checking that disabled attributes in graphql are removed from the graphql schema

* adding test for buidShadowCrud

* Update packages/strapi-plugin-graphql/services/type-builder.js

Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>

Co-authored-by: Rmaroun <rmaroun@outlook.com>
Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>
2021-05-10 09:35:07 +02:00
Alexandre Bodin
c7d67c53ed Add tests & handle _or & _where 2021-04-08 14:47:05 +02:00
Convly
4c21bea64b Use a global timeout instead of redefining it everytime 2021-03-26 20:15:38 +01:00
Convly
2a483ba958 Cleanup
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-08 10:09:08 +01:00