khaosdoctor / gotql

GraphQL query utility for serverside apps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Use GOT cache mechanism to cache GRAPHQL responses

paulogr opened this issue · comments

Is that possible to cache post requests on a GRAPHQL endpoint?

Could help me with some ideas to accomplish this?

I already tried to use the got cache mechanism with redis but by now, without success.

Thank you very much!

Hey thanks for the issue!

This can be done using any caching mechanism. GotQL actually don’t try to tap into that point.

One thing you can do is to use the server caching mechanisms if you have access to the server’s configuration, if you don’t have the access to it, you can use any caching solution like WebCache (https://developer.mozilla.org/en-US/docs/Web/API/Cache if you’re using deno) or you can simply store a file named as the hash of the query with the contents as its response