put redis in front of your graphql server.
let the key be the query hash. and the ttl be 30 seconds.
if your query has many duplicate lookups (e.g. the same user appears multiple times on the leaderboard) use dataloader.
I suppose authentication & authorization would complicate things a fair bit, but yeah this should at least work for white-listed, public queries. Thanks.
oefrha|5 years ago