4 ms·
I'm positive there's a way to only load the relevant data in your stack. In Elixir with Absinthe we can resolve to the specific fields we need and we don't loa
by sergiotapia 7y ago
I'm positive there's a way to only load the relevant data in your stack.
In Elixir with Absinthe we can resolve to the specific fields we need and we don't load the entire records then slim down.
- picardo 7y agoI never used Absinthe, but if you're initializing an ORM in your resolver, loading the entire record into memory is unavoidable. How does Absinthe get around that? (Sounds like it generates the SQL?)
- sergiotapia 7y agoyou point it to a resolver, in your resolver your resolve, in other words write the query
- nivertech 7y agoAbsinthe does some dumb things by default too. You need to manually optimize your resolvers. One annoying thing Absinthe did by default I noticed was fetching entire object from DB, even though the GraphQL query only returns it's ID. For example query below would fetch each person from a DB, even though we already had a list of person IDs on the friends level: { friends { person { id } } }