GraphQL Ruby

GraphQL Ruby

Application and Data / Languages & Frameworks / Query Languages
Avatar of thebadmonkeydev
Senior Software Engineer at StackShare

When we went all in on adopting GraphQL Ruby as our backend API standard there wasn't any good way to handle fine grain caching of resolved fields. We could hack around it caching the entire JSON document, but this was too heavy-handed. We also needed to expose real-time fields next to large cached collections in our schema which isn't possible this way.

To solve the problem we built GraphQL Cache which is a custom plugin for GraphQL Ruby that provides field-level caching. The gem integrates with Rails so that it can be easily dropped into an app and used to cache computational or network intensive resolvers at a layer similar to the Rails controllers we're all used to. For more information on why and how GraphQL Cache came to be, read the blog post linked to this decision.

READ MORE
Introducing GraphQL Cache | StackShare (stackshare.io)
5 upvotes5.8K views