apollo-feature-requests icon indicating copy to clipboard operation
apollo-feature-requests copied to clipboard

Validate Apollo Client typePolicies `keyFields` with Apollo CLI

Open justinanastos opened this issue 4 years ago • 0 comments

Apollo Client 3 support's a new cache configuration mechanic with typePolicies, specifically allowing us to define a canonical id for a type via keyFields. I've run into several cases where I add a keyFields value and then get runtime errors for not fetching that field. This seems like a great place to integrate with the Apollo CLI to verify that keyFields definitions in typePolicies always have the fields required in all queries.

justinanastos avatar Jul 15 '20 15:07 justinanastos