3 ms·
REST v3 API supports conditional requests, that return 304 when content hasn't changed since last time you asked and don't count against rate limit. It means on
by shurcooL 9y ago
REST v3 API supports conditional requests, that return 304 when content hasn't changed since last time you asked and don't count against rate limit. It means one can use a caching HTTP transport and benefit from that.
Is there any support for caching in the GraphQL v4 API? I'm not seeing anything about it in the docs.
- cryptonector 9y agoIf your query is complex and/or depends on sharded data, it can be difficult or impossible to cheaply (i.e., without re-executing the query) check whether the results have changed. That doesn't mean that the server couldn't execute the query, hash the results, and compare to an ETag from a client's If-None-Match: header, or some GraphQL equivalent of that (if it has it), thus saving network bandwidth. You just might not be able to save cycles and I/O on the server-side.
- shurcooL 9y agoI found this in the GraphQL docs: http://graphql.org/learn/caching/ http://graphql.org/learn/caching/