Skip to content

fix: add support for nested where criteria expressions #148

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 1 commit into from
Jun 9, 2019

Conversation

igdianov
Copy link
Collaborator

@igdianov igdianov commented Jun 9, 2019

This PR adds support for nested where criteria expressions, i.e. given query

query { 
  Humans {        
    select {
      id
      name
      homePlanet
      favoriteDroid {
        name
        primaryFunction(where:{function:{EQ:"Astromech"}}) {
          function
        }
      }
    }
  }  
}

Will result in

{
  "data": {
    "Humans": {
      "select": [
        {
          "id": "1001",
          "name": "Darth Vader",
          "homePlanet": "Tatooine",
          "favoriteDroid": {
            "name": "R2-D2",
            "primaryFunction": {
              "function": "Astromech"
            }
          }
        }
      ]
    }
  }
}

@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 #148 into master will increase coverage by 0.08%.
The diff coverage is 92.5%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #148      +/-   ##
============================================
+ Coverage     68.28%   68.36%   +0.08%     
+ Complexity      443      442       -1     
============================================
  Files            33       33              
  Lines          2248     2254       +6     
  Branches        336      337       +1     
============================================
+ Hits           1535     1541       +6     
  Misses          577      577              
  Partials        136      136
Impacted Files Coverage Δ Complexity Δ
...ry/schema/impl/GraphQLJpaOneToManyDataFetcher.java 73.77% <100%> (-0.08%) 11 <0> (-4)
...jpa/query/schema/impl/GraphQLJpaSchemaBuilder.java 87.67% <100%> (+0.02%) 120 <0> (+1) ⬆️
...a/query/schema/impl/QraphQLJpaBaseDataFetcher.java 71.65% <91.89%> (+0.31%) 149 <10> (+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 fcf9f12...a93d532. Read the comment docs.

@igdianov igdianov merged commit 2065101 into master Jun 9, 2019
@igdianov igdianov deleted the igdianov-fix-nested-predicates branch June 9, 2019 17:22
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