Skip to content

fix: correct element collection fetch sort order #149

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

Merged
merged 2 commits into from
Jun 9, 2019

Conversation

igdianov
Copy link
Collaborator

@igdianov igdianov commented Jun 9, 2019

This PR fixes element collections fetch sort order, i.e. given

{
  Humans ( where: { 
    appearsIn: {IN: [THE_FORCE_AWAKENS]}
  }) { 
    select { 
      name 
      appearsIn 
    } 
  }
}

Will result:

{
  "data": {
    "Humans": {
      "select": [
        {
          "name": "Luke Skywalker",
          "appearsIn": [
            "A_NEW_HOPE",
            "EMPIRE_STRIKES_BACK",
            "RETURN_OF_THE_JEDI",
            "THE_FORCE_AWAKENS"
          ]
        },
        {
          "name": "Han Solo",
          "appearsIn": [
            "A_NEW_HOPE",
            "EMPIRE_STRIKES_BACK",
            "RETURN_OF_THE_JEDI",
            "THE_FORCE_AWAKENS"
          ]
        },
        {
          "name": "Leia Organa",
          "appearsIn": [
            "A_NEW_HOPE",
            "EMPIRE_STRIKES_BACK",
            "RETURN_OF_THE_JEDI",
            "THE_FORCE_AWAKENS"
          ]
        }
      ]
    }
  }
}

@igdianov igdianov self-assigned this Jun 9, 2019
@igdianov igdianov added the bug label Jun 9, 2019
@codecov
Copy link

codecov bot commented Jun 9, 2019

Codecov Report

Merging #149 into master will decrease coverage by 0.13%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #149      +/-   ##
============================================
- Coverage     68.36%   68.23%   -0.14%     
+ Complexity      442      440       -2     
============================================
  Files            33       33              
  Lines          2254     2254              
  Branches        337      337              
============================================
- Hits           1541     1538       -3     
- Misses          577      578       +1     
- Partials        136      138       +2
Impacted Files Coverage Δ Complexity Δ
...hql/jpa/query/schema/impl/JpaPredicateBuilder.java 51.98% <100%> (-1.2%) 57 <0> (-2)

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 2065101...75f4fee. Read the comment docs.

@igdianov igdianov merged commit 5327a22 into master Jun 9, 2019
@igdianov igdianov deleted the igdianov-fix-elemenc-collection-sort branch June 9, 2019 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant