Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap Ministers Index GraphQL #joins for #includes
Because, despite looking very similar (to me), of these two methods, ActiveRecord only treats #includes as eagerloading. (For anybody not familiar, this results in lazy-loading, i.e. separate database queries later on for any associations that are accessed in our code.) With my local data, this reduced the number of database queries made in order to serve the Ministers Index page from 1144 down to 280.
- Loading branch information