Closed
Description
It seems where
clauses on a nested many-to-one relationship are ignored.
I've updated the example app to demonstrate the problem. There aren't enough '-to-one' relationships available in the example model to recreate so I've added a new one - a Droid's PrimaryFunction replacing String primaryFunction
:
This simpler example works - only the Astromech is returned:
query {
Droids {
select {
name
primaryFunction(where:{function:{EQ:"Astromech"}}) {
function
}
}
}
}
But this one doesn't - the Protocol droid is also returned:
query {
Humans {
select {
id
name
homePlanet
favoriteDroid {
name
primaryFunction(where:{function:{EQ:"Astromech"}}) {
function
}
}
}
}
}
I've also applied the model changes to graphql-jpa-query-schema
's tests and added the above two examples as tests - the second one currently fails as the Protocol droid and its parent Luke Skywalker should not be returned.