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

Add dataloader/2 function to helpers #898

Merged

Conversation

maartenvanvliet
Copy link
Contributor

Adds a convenience dataloader/2 function that I've needed a couple of
times. It's useful in cases where the resource can be inferred from the
field name but you still want to pass in extra opts such as args or
callback to the dataloader function.

Adds a convenience `dataloader/2` function that I've needed a couple of
times. It's useful in cases where the resource can be inferred from the
field name but you still want to pass in extra opts such as `args` or
`callback` to the dataloader function.
Copy link
Contributor

@benwilson512 benwilson512 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I was concerned about ambiguity with the other clauses, but I don't think that's actually an issue. The other clauses take a function as a second arg which is easily distinguishable.

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

Successfully merging this pull request may close these issues.

2 participants