Skip to content

Declarative cache: allow specifying lists of key arguments #142

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

Open
Tracked by #2331
martinbonnin opened this issue Dec 21, 2022 · 0 comments
Open
Tracked by #2331

Declarative cache: allow specifying lists of key arguments #142

martinbonnin opened this issue Dec 21, 2022 · 0 comments

Comments

@martinbonnin
Copy link
Contributor

Use case

When using the declarative cache, it's possible to specify key arguments with @fieldPolicy:

extend type Query @fieldPolicy(forField: "book", keyArgs: "id")

While this works for fields that return a single object, this doesn't work for fields that return a list (or list of lists, etc..):

type Query {
  # Doesn't work 
  books(ids: [String!]!) @fieldPolicy(forField: "book", keyArgs: "ids")
}

Describe the solution you'd like

Not 100% sure yet. This will certainly have to cooperate with pagination.

@martinbonnin martinbonnin changed the title Declarative cache: allow specifying lists of key arguments Declarative cache: allow specifying lists of key arguments Sep 13, 2024
@BoD BoD transferred this issue from apollographql/apollo-kotlin Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant