can lighthouse Laravel GraphQL cache the APIs response?

can lighthouse Laravel GraphQL cache the APIs response?


0

Recently I have been working on GraphQL APIs. Due to the scalability of the project, I want to know if can i cache the response coming from apis.

I know that we can use the query cache and schema cache facility from the lighthouse package. However, my concern is they cache the response during the use of the cache facility in the project.

if we cannot cache the API’s response using query cache directives then how can I can do that in my project?

New contributor

Hassan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

  • If you want to cache the final response, no there isn't any built-in solution for this. You can use the lighthouse-php.com/master/api-reference/events.html#endrequest to capture the final response and do what you want. Another option will be varnish. Anyway, you have to analyze the incoming POST request to build a unique cache key.

    – mostafa

    42 mins ago


Load 6 more related questions


Show fewer related questions

0



Leave a Reply

Your email address will not be published. Required fields are marked *