:question: How do the incubating cache artifacts ...
# apollo-kotlin
s
How do the incubating cache artifacts treat paginated query responses differently when specifying
paginationArgs
as part of a field policy at the moment? I assume there are benefits (or will be benefits to come down the line?) 😄
m
The main benefit is that it allows to use the same cache keys for multiple pages
Bottom line is
paginationArgs
are ignored when computing the cache key for a given object
So if you have say:
Copy code
type Query @fieldPolicy(forField: "authors", paginationArgs: "first, after") {
  authors: [Author]
}
And this query:
Copy code
{
  authors(first: 50, after: 0) {
    id
  }
}
Then the cache key will always be computed as
QUERY_ROOT.authors
(instead of
QUERY_ROOT.authors({"first": 50, "after": 0})
)
s
Ah great, makes sense, thanks!
m
You're welcome!