apollo-feature-requests
apollo-feature-requests copied to clipboard
Validate Apollo Client typePolicies `keyFields` with Apollo CLI
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.