4 Matching Annotations
- Aug 2023
-
evilmartians.com evilmartians.com
-
TL;DR For classic Rails apps we have a built-in scope for preloading attachments (e.g. User.with_attached_avatar) or can generate the scope ourselves knowing the way Active Storage names internal associations.GraphQL makes preloading data a little bit trickier—we don’t know beforehand which data is needed by the client and cannot just add with_attached_<smth> to every Active Record collection (‘cause that would add an additional overhead when we don’t need this data).That’s why classic preloading approaches (includes, eager_load, etc.) are not very helpful for building GraphQL APIs. Instead, most of the applications use the batch loading technique.
-
-
engineering.universe.com engineering.universe.com
- Jun 2021
-
docs.gitlab.com docs.gitlab.com
-
As an example you might create 5 issues in between counts, which would cause the query count to increase by 5 if an N+1 problem exists.
-
QueryRecorder is a tool for detecting the N+1 queries problem from tests.
-