Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programmatic Caching Support For Relay Style Pagination #5666

Closed
ArjanSM opened this issue Feb 29, 2024 · 4 comments
Closed

Programmatic Caching Support For Relay Style Pagination #5666

ArjanSM opened this issue Feb 29, 2024 · 4 comments

Comments

@ArjanSM
Copy link
Contributor

ArjanSM commented Feb 29, 2024

Use case

Hi Team 👋
Exciting to see the changes pertaining to merging of Relay Style Pagination Responses in the Incubating Normalized Cache.
In order to use the feature(s) that enabling merging of the Relay Style Pagination Response in Incubating Normalized Cache requires setting a few parameter(s), while defining custom directives @fypePolicy or @fieldPolicy.
However, is there any plan to enable this feature with the programmatic cache keys such as CacheKeyGenerator and CacheKeyResolver?

Describe the solution you'd like

I'll leave it to the maintainers to decide.

@BoD
Copy link
Contributor

BoD commented Feb 29, 2024

Hi! You're right this is declarative only currently, and it would probably makes sense to have a programmatic API as well. I'll keep this ticket open to track it.

To better understand the need, may I ask why you'd prefer it over the declarative way?

@ArjanSM
Copy link
Contributor Author

ArjanSM commented Feb 29, 2024

Hi @BoD
Thanks for the quick response.
Yes, so we have been utilising CacheKeyGenerator and CacheKeyResolvers to programmatically generate CacheKeys.
We preferred not to maintain an additional artifact in extra.graphql specifically because we didn't want multiple teams to step on top of each other's changes.

@BoD
Copy link
Contributor

BoD commented May 6, 2024

It is actually now possible to use the pagination mechanism with a programmatic configuration only, since #5772. An example is available in ConnectionProgrammaticPaginationTest.

@BoD BoD closed this as completed May 6, 2024
Copy link
Contributor

github-actions bot commented May 6, 2024

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo Kotlin usage and allow us to serve you better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants