Fix client.readFragment/client.readQuery when passing optimistic: true in options#13281
Conversation
🦋 Changeset detectedLatest commit: c03a2b7 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 |
✅ Docs preview readyThe preview is ready to be viewed. View the preview File Changes 0 new, 1 changed, 0 removedBuild ID: 32d8a67dd842969441b0f51d URL: https://www.apollographql.com/docs/deploy-preview/32d8a67dd842969441b0f51d ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough
ChangesOptimistic option fix for readQuery and readFragment
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
|
Looks like this partially overlaps with #13278 - we should probably see that we coordinate this, but get the user contribution in, too. |
|
@phryneas somehow I missed that PR open. Thanks! We'll have to wait for the CLA to be signed so lets see what happens with that. |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## @apollo/client@4.2.4 ### Patch Changes - [#13281](#13281) [`e4df809`](e4df809) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fixes an issue where `client.readFragment` and `client.readQuery` ignored the `optimistic` option when passed in the options object. Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Fixes #13276
Summary by CodeRabbit
Bug Fixes
readQueryandreadFragmentnow correctly respect theoptimisticoption provided in the options object, rather than defaulting to false.Tests