Disable launches type policy keyArgs to fix pagination #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When launches are originally fetched, they are fetched without any pagination parameters. This means by default they're stored in the cache under a key of
launches({}). Then when the next batch of launches is fetched through pagination, anafterparameter is used to mark the next batch of launches to be loaded. By default, the cache will use parameters as part of the key it stores values under, which means the next batch of launches is stored under a key that looks something likelaunches({"after":"1558665000"}). When the launches merge function tries to merge previous results with new incoming results, it doesn't see any previous results when a new batch of launches is received, because each time that batch is stored under a separate cache key.Setting
keyArgs: falsefor thelaunchesfield policy tells the cache to ignore theafterparameter, making sure all launches are stored under the same cache key. This helps the merge function load previous launches, and merge in the newlaunches.