3 ms·
I built something slightly different when I was working at IFTTT. The main idea was to feed the Active Record preloader with hints from the GraphQL queries. O
by nettofarah 6y ago
I built something slightly different when I was working at IFTTT.
The main idea was to feed the Active Record preloader with hints from the GraphQL queries.
Of course this only works well when your GraphQL schema matches your database schema (which is most cases anyway in my experience).
https://github.com/nettofarah/graphql-query-resolver https://github.com/nettofarah/graphql-query-resolver
Here's a video of a talk I gave about the approach at GraphQL Europe in 2017:
https://www.youtube.com/watch?v=TIzEZJuDpIQ https://www.youtube.com/watch?v=TIzEZJuDpIQ
- adwww 6y ago> which is most cases anyway in my experience Which is interesting, because every other comment here is saying it shouldn't.
- nettofarah 6y agoI agree with you. Not many things in life are done as they were supposed to be done. Hindsight is 20/20. I built this tool to help with existing codebases. At IFTTT specifically, we saw an instant 60% reduction in database IOPS. Not too bad for 1~2 days of coding.