You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+4-7Lines changed: 4 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,19 +10,16 @@ Because all GraphQL requests are on a single endpoint and resources are differen
10
10
11
11
This package takes a GraphQL request, caches the response - if the same request is repeated again, we can serve the response directly from cache without hitting the origin server.
12
12
13
-
## Why can I just use a key value store to cache?
13
+
## Why can't I just use a key value store for caching my GraphQL requests?
14
14
15
15
You can, but the challenge comes with cache invalidation. How do you identify what fields have changed or have been added so you can invalidate your cache? One way is to invalidate everything for the user - but if you have updates happening often, it becomes as good as no cache.
16
16
17
17
Since all requests to your GraphQL server pass through `graphql_cache` (including mutations), it can automatically invalidate objects and entire queries for which data has changed. Basically, it supports partial cache invalidation.
18
18
19
19
## What's the current status of this project?
20
20
21
-
This currently an experiment, and still a work in progress.
21
+
This is still a work in progress, and is not yet ready for production use.
2. Query caching is tested for only the test API and not for all possible query formats/types.
25
-
3. Limited to one operation per request.
26
-
4. More limitations that I can't even think of now.
23
+
## Is there a hosted version?
27
24
28
-
Once the project is feature complete, it will be open sourced. Once it is ready enough to handle hobby project workloads, it will be open sourced as a complete package.
25
+
No. But there will be a Dockerfile you can use to run the Cache server.
// for the operation op we need to traverse the response and the ast together to build a graph of the relations
164
-
165
-
// build the relation graph
143
+
// for the operation op we need to traverse the response and build the relationship map where key is the requested field and value is the key where the actual response is stored in the cache
0 commit comments