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

Procs in preload #23

Closed
wants to merge 2 commits into from
Closed

Conversation

blairio
Copy link

@blairio blairio commented Apr 18, 2019

Allows Procs to an options to preload.

Fixes #22

blairio added 2 commits April 17, 2019 17:01
I have a use case where a single graphql type is resolving two different active record models.
Sometimes the associations are not the same, so we cannot specify the preload field data until we know the record
This adds supports for Procs in the preload metadata where the proc receives the record and can return the actual preload association or nil to skip it.
@tjsingleton
Copy link

This pull request has been closed because it has not had recent activity.

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.

Allow preload option to an accept a proc
2 participants