Skip to content

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

Open
@th3nu11

Description

@th3nu11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions