Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GraphQL schema operations #5993

Merged
merged 66 commits into from
Sep 2, 2019

Conversation

davimacedo
Copy link
Member

Includes:

  • createClass mutation
  • updateClass mutation
  • deleteClass mutation
  • class query
  • classes query

Removes:

  • create generic mutation
  • update generic mutation
  • delete generic mutation
  • get generic query
  • find generic query

Fix tests that depend on generic operations.

@davimacedo
Copy link
Member Author

Close #5925

Copy link
Contributor

@douglasmuraoka douglasmuraoka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great to be able to manipulate the schema from GraphQL 🎉

Some general comments:
objectsQueries and objectsMutations are not loaders anymore, so I believe we could move them to another dir.
About classSchemaMutations, wouldn't it be parseSchemaMutations or just schemaMutations? Same applies to classSchemaQueries.

src/GraphQL/loaders/objectsMutations.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/defaultGraphQLTypes.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/classSchemaTypes.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/defaultGraphQLTypes.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/classSchemaTypes.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/classSchemaQueries.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/classSchemaMutations.js Outdated Show resolved Hide resolved
src/GraphQL/loaders/classSchemaQueries.js Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Aug 31, 2019

Codecov Report

Merging #5993 into master will decrease coverage by <.01%.
The diff coverage is 95.05%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5993      +/-   ##
==========================================
- Coverage   93.73%   93.73%   -0.01%     
==========================================
  Files         156      163       +7     
  Lines       10939    11080     +141     
==========================================
+ Hits        10254    10386     +132     
- Misses        685      694       +9
Impacted Files Coverage Δ
src/GraphQL/loaders/objectsMutations.js 83.33% <ø> (-13.73%) ⬇️
src/GraphQL/loaders/objectsQueries.js 98% <ø> (+0.66%) ⬆️
src/GraphQL/loaders/parseClassTypes.js 86.26% <100%> (+0.54%) ⬆️
src/GraphQL/loaders/defaultGraphQLQueries.js 100% <100%> (ø) ⬆️
src/GraphQL/loaders/defaultGraphQLMutations.js 100% <100%> (ø) ⬆️
src/GraphQL/loaders/defaultGraphQLTypes.js 96.41% <100%> (-0.79%) ⬇️
src/GraphQL/ParseGraphQLSchema.js 96.81% <100%> (+0.04%) ⬆️
src/GraphQL/transformers/schemaFields.js 100% <100%> (ø)
src/GraphQL/parseGraphQLUtils.js 93.33% <100%> (-0.22%) ⬇️
src/GraphQL/loaders/classSchemaTypes.js 100% <100%> (ø)
... and 22 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b47d9fb...153718e. Read the comment docs.

@Moumouls
Copy link
Member

The spec and the implementation seems good to me.
I notice that you wrap fields in schemaFields for a later implementation of indexes ?

So great job, we are currently moving to a full app backend fully manageable via GraphQL 🚀

Copy link
Contributor

@douglasmuraoka douglasmuraoka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@davimacedo
Copy link
Member Author

@Moumouls yes. That's the idea. Later we need to include indexes, CLP, defaultValue and required information. I just added a task in the project.

@davimacedo davimacedo merged commit 5a482bd into parse-community:master Sep 2, 2019
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* Remove nested operations

* Improve error log

* Fix bug schema to load

* Fix ParseGraphQLSchema tests

* Fix tests

* Fix failing tests

* First verstion not complete of create class mutation

* Fix bug caused by circular dependency

* Renaming files

* Schema types should be loaded before parse classes

* Fix tests

* Create class mutation boilerplate

* Improve CreateClassSchemaInput fields names

* Remove fields

* Pointer and relation fields

* Improve pointer default type

* Class type

* Create class mutation resolver

* Schema field transformers

* Class types transformations

* First test

* Numbers test

* Boolean tests

* Date test

* Fix some get tests

* Test for created at and updated at

* File tests

* Test for objects

* Renaming reducerFabric to reducerGenerator

* Changing get tests for file and object

* Object composed queries test

* Array test

* Null field test

* Bytes test

* Geo Point test

* Polygons tests

* Remove create generic mutation

* Fix tests

* Create class test - isRequired and defaultValue will be added back later

* Enforce master key

* Fix tests

* Duplicated field test

* updateClass mutation

* Remove update generic mutation tests

* Remove update generic mutation

* deleteClass mutation

* Remove delete generic mutation tests

* Remove delete generic mutation

* class query

* Classes query

* Remove get generic query from tests

* Remove remaining generic operations and fix tests

* Fix last test

* Try to fix redis tests

* Fix postgres tests

* Update objectsMutations and objectsQueries files locations

* Rename classSchema files to schema files

* Rename ClassObject to ParseObject

* Fix names and paths

* Still some wrong names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants