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

NFR: flag to do the mapping #57

Open
cyberhck opened this issue Feb 23, 2021 · 0 comments
Open

NFR: flag to do the mapping #57

cyberhck opened this issue Feb 23, 2021 · 0 comments

Comments

@cyberhck
Copy link

So every single data loader usage will have a mapping thing going on inside, it's basically:

  • query the db
  • db returns in an order
  • initialize a map and populate that map based on id
  • traverse through original input ids,
  • create a slice in that original order
  • return that slice

I feel like since this is exactly the same for every single data loader which deals with db, why not add a flag which will include this as well?

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