Overview
In Opus, queries are built as objects and then serialized into a graphql document.
The serialization process, although is pretty fast already, can be improved with memoization, at least partly.
Requirements
When having a query for e.g. product, one will fetch it several times for different products with different arguments, but the query itself will remain the same. Hence, when re-fetching a query, it will be necessary to:
- process the arguments all over again
- use the result of previous query serialization for the body itself
Such a change will bring some additional bundle size. It is required to take a weighted decision on whether such an improvement in performance is worth it. The bundle size growth must be minimal.
Overview
In Opus, queries are built as objects and then serialized into a graphql document.
The serialization process, although is pretty fast already, can be improved with memoization, at least partly.
Requirements
When having a query for e.g. product, one will fetch it several times for different products with different arguments, but the query itself will remain the same. Hence, when re-fetching a query, it will be necessary to:
Such a change will bring some additional bundle size. It is required to take a weighted decision on whether such an improvement in performance is worth it. The bundle size growth must be minimal.