Skip to content

Declarative cache: allow specifying lists of key arguments  #142

Closed
@martinbonnin

Description

@martinbonnin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions