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

Improve built-in Rails support for Dataloader #5213

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

rmosolgo
Copy link
Owner

@rmosolgo rmosolgo commented Jan 24, 2025

I was helping someone move database access to Dataloader and decided that some of the "boilerplate" could be shipped with the gem:

  • Record and Association source classes
    • Check for already-loaded associations before pausing the Fiber
  • ActiveStorage sources, others?
  • Helper methods for built-in sources
  • A cop to spot possible dataloader-friendly accesses
  • Field config helpers to automatically call dataload helpers (eg dataload_association: true)
  • Would enabling ActiveRecord Strict mode help catch these missing batch loads?
  • Add trace hooks for dataloader sources

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.

1 participant