Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

I am using boot-graphql-kick-start in my project(I used Netflix DGS. Result is the same). When I used Dataloader, the result is missmatching. where am I wrong? Can you help me?

Query:
image

Result:
image

Entity: I have ManyToOne Relation With My RoleEntity
image

DataLoader Method: I'm Using BatchLoader for n+1.
image

Hibernate Query: In dataLoader Iam wathcing the result. Is seems correctly
image

You must be logged in to vote

Replies: 1 comment

Comment options

You could reorder the results to match the order of your keys (roles) or use MappedBatchLoader to return a Map with:

roleService.findByIdIn(roles).stream().collect(Collectors.toMap(Role::getId, item -> item));
You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #79 on July 31, 2021 10:17.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.