What is the distinction between @connection and keyArgs?

Viewed 172

Apollo 3 introduced typePolicies and keyArgs as a way to tell the cache how to store data and avoid duplicate entries. This seems akin to the @connection directive, which provides similar functionality (specify a custom store key for results).

Is it necessary and safe to use both in an application? When would it make sense to choose one over the other?

1 Answers

I also had the same question. After 3 days of searching and reading, I found a link to a gist that answer the question. Github Gist

Related