-
Notifications
You must be signed in to change notification settings - Fork 317
QuerydslDataFetcher
to specify which properties and associations to fetch
#87
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
Comments
At least for *-1 relationships that is very reasonable. |
Scheduling tentatively. |
After a little investigation I realised that under the hood the Anyway, repositories deliberately do not have a way to specify an But it makes a lot of sense for GraphQL. |
That isn't something that we can solve already. We face demand for various types of projections (interface/DTO projections, limiting/expressing the properties to materialize) for Spring Data's Querydsl and Query-by-Example programming models so we should investigate how we can approach these requirements. |
We're investigating means to express eager-loading/how to prevent loading relationships using Spring Data JPA with GraphQL. |
Fellow SPQR user here. I was able to solve this problem in my own application with the help of the Cosium/spring-data-jpa-entity-graph library. I can't post the exact code I wrote, but the general algorithm is this:
|
QuerydslDataFetcher
to specify which properties and associations to fetch
This issue is superseded by PR #168 which implements the required changes. |
I've just been having a play with the library testing it with my current GraphQL implementation using https://github.com/leangen/graphql-spqr
I've tried using the QuerydslDataFetcher like this by passing in the DataFetchingEnvironment:
Just to clarify should this be joining entities requested in the dataFetchingEnvironment.
e.g if the query requested a job with a customer like this:
From a Job Entity with a Customer Entity mapped ManyToOne, should it be joining the customer entity in the query?
Because currently I'm seeing N+1 behaviour, thought I'd clarify if Joining is supposed to happen before I investigate if it's a Hibernate mapping issue instead.
The text was updated successfully, but these errors were encountered: