Introduce caching options
See original GitHub issueIn some cases, nested GraphQL queries can result in a (large) number of duplicate requests to the wrapped REST-like API. In consequence, many slow HTTP(S) requests need to be performed, backend systems may be burdened, and rate limits may suffer.
One option to avoid this behavior is to introduce caching in the GraphQL layer. Caching would:
- Be optional and disabled by default
- Be applicable to
queryoperations only, which we assume to be safe and idempotent
In a first implementation, caching could be enabled globally for all query operations. A maximum cache duration in milliseconds can be provided (with a sensible default). In later implementations, caching could be enabled for selected endpoints only, for example based on the operationId property.
For a simple example of how to enable caching based on the URL of a request, consider: https://github.ibm.com/witternj/secure-graph/commit/23ea7287f2651d220092fced20f88d0bad9d6be7
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (5 by maintainers)

Top Related StackOverflow Question
@Alan-Cha Leave me with this
Sadly not