Adding useFragment support to ApolloClient

Have a PR up proposing an ApolloClient useFragment and useFragmentWhere API for entity reading/filtering in our Apollo cache extensions lib: https://github.com/NerdWalletOSS/apollo-cache-policies/pull/33…. Looking for feedback from the community on whether this would valuable and what the API should look like as we’re considering using it ourselves internally to relieve some overhead when accessing data from the cache. Thanks!

1 Like

Very exciting @danReynolds! I’m not sure if you were aware of this or not, but we’re adding a useFragment hook to Apollo Client 3.5. We have some POC work done but haven’t shared the details yet, so this is a great time to collaborate! We’re tracking things over here:

@benjamn @brainkim

2 Likes

Cool stuff! Interested in seeing how it gets implemented.

1 Like