-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request 241: reuse mocks in MockLink / MockedProvider #11178
Feature request 241: reuse mocks in MockLink / MockedProvider #11178
Conversation
👷 Deploy request for apollo-client-docs pending review.Visit the deploys page to approve it
|
🦋 Changeset detectedLatest commit: fd5b55f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Hey @sebakerckhof 👋 Appreciate the PR! FYI, I've pointed this at our 3.9 release branch since its a both a new feature and you've indicated this as a minor version change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd love for @alessbell to have a look at this as well since she is currently focusing on some improvements to test utilities and I'm sure will have some thoughts.
Really appreciate the contribution here @sebakerckhof!! I think this will make a nice addition to the library 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great quality of life improvement that I think many will find useful. Appreciate you picking this up!
As mentioned, I'd like @alessbell to take a look at this as well, but from my side, this looks great 🎉
FYI, I've run prettier on the |
Thanks for your patience, @sebakerckhof! With #6701 merged, there are a few conflicts - I can take a pass at resolving them, unless you'd prefer to look at those yourself, though I'm also at a conference this week so hopefully by Friday I'll be able to get this wrapped up. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for jumping on updating the PR, @sebakerckhof! This LGTM - excited to get this out in the next 3.9 alpha 🙌
.api-reports/api-report-react.md
Outdated
} | ||
|
||
// @public (undocumented) | ||
class SuspenseCache_2 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused as to why these SuspenseCache
updates are here @phryneas - this branch has your recent commit that landed on main that removed it... I'm going to merge this PR anyways and we can address this elsewhere if it's unintended, but wanted to flag it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah whoops, I had an old version in dist
and didn't realize. Made a small tweak to the script so it's impossible to make this mistake again :) 1fc9df6
Useful for using MockedProvider in storybook or in tests where we want to test for intervals etc.
Link to feature request: apollographql/apollo-feature-requests#274
I went with one of the suggestions in that discussion to introduce a 'reuse' variable. But open for other suggestions