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

Unnecessary function wrap #34

Open
WillSquire opened this issue Jul 1, 2020 · 1 comment
Open

Unnecessary function wrap #34

WillSquire opened this issue Jul 1, 2020 · 1 comment

Comments

@WillSquire
Copy link

In your examples, I believe this:

return new DataLoader<string, Account>(keys =>
      this.accountService.findByIds(keys)
)

Can be this:

return new DataLoader<string, Account>(this.accountService.findByIds)

If it's helpful.

@jeromemeichelbeck
Copy link

Well I guess it's just an exemple.

Also I think the findByIds method doesn't guarantee the order, so we should make extra work to make sure that the we return the instances in the same order of the keys.

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

2 participants