kamilkisiela / apollo-angular

A fully-featured, production ready caching GraphQL client for Angular and every GraphQL server 🎁
https://apollo-angular.com
MIT License
1.5k stars 309 forks source link

feat: adds `watchFragment` support #2226

Closed alessbell closed 1 month ago

alessbell commented 5 months ago

Adds support for a new method available on an ApolloClient in 3.10, watchFragment (docs).

To do

changeset-bot[bot] commented 5 months ago

🦋 Changeset detected

Latest commit: 4f986b2c69fc33b0bb8903b688ce8fc5a91e7b5a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | -------------- | ----- | | apollo-angular | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

chimurai commented 2 months ago

Looking forward to use watchFragment 🙂

Is help needed to land this PR?

(apollo-client 3.10 has been released)

alessbell commented 2 months ago

Hi @chimurai 👋 Glad to know you're excited for this feature :) I'll get the PR updated and ready for final review.

alessbell commented 2 months ago

This is ready for a final pass @PowerKiKi - thanks for the reviews!

Regarding docs: would you be ok with a fast follow PR? I was thinking of updates to the Using Fragments page but I don't have much bandwidth in the next few weeks. Happy for any suggestions here.

alessbell commented 2 months ago

Not sure why that one test timed out - @PowerKiKi any ideas there?

alessbell commented 2 months ago

It looks like these tests are failing on main - anything I can do to help unblock this PR, @PowerKiKi?

PowerKiKi commented 1 month ago

It's fine if the docs comes in the next PR.

I fixed the CI that broke because of Renovate in the unrelated #2267.

Before merging this, I'd like to understand the story around the newly introduced class Fragment. I think it only makes sense if it is used by code generations tools. What's your opinion ? Will @graphql-codegen/cli be adapted accordingly ? or should we drop the class ? or is it useful for something else ?

alessbell commented 1 month ago

Thanks @PowerKiKi - I'll descope codegen for now and have gone ahead and removed the Fragment class from the PR. Let me know if there's anything else, appreciate the reviews!

alessbell commented 1 month ago

Squashed and needed to merge master one last time - lmk if that's an issue. Thanks again @PowerKiKi.

PowerKiKi commented 1 month ago

Thanks for your work. It's been released as 7.1.1 (7.1.0 release process crashed)