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: Change Order Enum Strategy #6515

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

Moumouls
Copy link
Member

Due to ardatan/graphql-tools#1206, enums with custom value are not correctly merged and lead to bugs and validation error.

We need to transform GraphQL Order to Parse Order later before sending request to Parse Server.

This bug only occur on merged schemas.

@Moumouls Moumouls added the type:bug Impaired feature or lacking behavior that is likely assumed label Mar 16, 2020
Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

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

Great job!

@codecov
Copy link

codecov bot commented Mar 23, 2020

Codecov Report

Merging #6515 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6515      +/-   ##
==========================================
+ Coverage   94.01%   94.03%   +0.02%     
==========================================
  Files         169      169              
  Lines       11825    11866      +41     
==========================================
+ Hits        11117    11158      +41     
  Misses        708      708              
Impacted Files Coverage Δ
src/GraphQL/loaders/parseClassQueries.js 97.91% <ø> (-0.05%) ⬇️
src/GraphQL/helpers/objectsQueries.js 91.33% <100.00%> (+0.58%) ⬆️
src/GraphQL/loaders/parseClassTypes.js 94.15% <100.00%> (-0.08%) ⬇️
src/Adapters/Auth/apple.js 100.00% <0.00%> (ø)
src/Adapters/Auth/instagram.js 100.00% <0.00%> (ø)
src/middlewares.js 97.36% <0.00%> (+0.16%) ⬆️

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 2c10d9e...df1b65f. Read the comment docs.

@davimacedo davimacedo merged commit 1b8f057 into parse-community:master Mar 23, 2020
@yaacovCR
Copy link
Contributor

A more long term approach would be to use https://www.npmjs.com/package/graphql-tools-fork, following gatsby and graphql-toolkit. Happy to help

@davimacedo
Copy link
Member

That would be great @yaacovCR . Feel free to open a PR.

@yaacovCR
Copy link
Contributor

Sounds good, does this change come with any failing tests to check?

@davimacedo
Copy link
Member

No failing tests were added. That's my bad. I should had requested @Moumouls to do so. But I was able to reproduce this issue myself. You just need to extend the graphql auto schema and then perform any sort in any query. I can try to write something if you need it.

@yaacovCR
Copy link
Contributor

I kind of need it. :) I want to be sure when I switch to fork and revert this patch that it still all works.

@davimacedo
Copy link
Member

davimacedo commented Mar 24, 2020

Just sent the PR: #6537

You can continue the development over that branch

@yaacovCR
Copy link
Contributor

This is now fixed in upstream graphql-tools as well in v5 which merges fork.

yaacovCR added a commit to yaacovCR/parse-server that referenced this pull request Apr 14, 2020
@yaacovCR
Copy link
Contributor

See #6611

davimacedo added a commit that referenced this pull request Apr 21, 2020
* Add test case for order option when extending the schema

* Remove fit

* upgrade to graphql-tools v5

revert #6515

Co-authored-by: Antonio Davi Macedo Coelho de Castro <[email protected]>
@mtrezza mtrezza removed the type:bug Impaired feature or lacking behavior that is likely assumed label Jul 11, 2021
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.

4 participants