Graphql-yoga: Caching for GraphQL servers

Created on 15 Feb 2018  路  7Comments  路  Source: dotansimha/graphql-yoga

While building GraphQL servers has become very easy, caching in GraphQL servers is still a fairly unexplored topic.

To start a conversation around this topic, I've listed a few ideas that came to mind. Ideally some of these ideas might eventually turn into actual libraries the GraphQL community can use:

Ideas:

  1. Declarative caching system based on SDL directives (field/resolver or type level)
  2. Caching layer built into GraphQL bindings
  3. Caching based on persisted queries

Relevant links:

kindiscussion statustale

Most helpful comment

Caching built into the bindings makes more since for me than caching the queries themselves.

  1. Would allow more control over when and how to clear the cache.
  2. Other queries using the same binding could use the same cached resource

All 7 comments

RIght now, there's the Apollo Caching system. However, there isn't any open source projects that I know of that implement this. Only Apollo Engine, which is a black box.

Caching on the edge is also important. That is probably beyond the implementation of Yoga, but should be considered when building something out.

Caching built into the bindings makes more since for me than caching the queries themselves.

  1. Would allow more control over when and how to clear the cache.
  2. Other queries using the same binding could use the same cached resource

Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.

There is an official apollo server doc on using a Memcached/Redis cache backend. But looks like no further info on how to integrate with yoga...

Due to inactivity of this issue we have marked it stale. It will be closed if no further activity occurs.

Hey :wave:, It seems like this issue has been inactive for some time. In need for maintaining clear overview of the issues concerning the latest version of graphql-yoga we'll close it.
Feel free to reopen it at any time if you believe we should futher discuss its content. :slightly_smiling_face:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bellomusodiq picture bellomusodiq  路  3Comments

joshhopkins picture joshhopkins  路  3Comments

playerx picture playerx  路  5Comments

2wce picture 2wce  路  4Comments

kv-pawar picture kv-pawar  路  3Comments