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

getResultStream should use query.getResultStream instead of query.getResultList().stream #295

Open
th3nu11 opened this issue Mar 17, 2021 · 0 comments

Comments

@th3nu11
Copy link

th3nu11 commented Mar 17, 2021

Hi all,

I am writing to you for help to check if my fixed is correct.

Seems that in the class/method GraphQLJpaQueryFactory::getResultStream that should return a stream but to do that the method convert the query stream to list.
See code here:

This thing resolves the entire query and does't use the jpa stream. I think the code should be

 return query.getResultStream()
                    .peek(entityManager::detach);

instead of the actual code:

 return query.**getResultList()
                    .stream()**
                    .peek(entityManager::detach);

Can you confirm if I am right or not?

Regards,
Carlo

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

No branches or pull requests

1 participant