Commit 4a6e86a
authored
optimize
* remove unused code path
Coverage shows that this code path was never hit - in the case of a `standby` fetchPolicy, `resultData.current` would already have been reset in `useResubscribeIfNecessary`
* move code from `toQueryResult` to `setResult`
While there are three code paths to `toQueryResult`, the other two are guaranteed to never have an `errors` property
* add undocumented `errors` field to types and deprecate it
* remove `useHandleSkip`
instead, we calculate and memoize an "override result" in `useObservableSubscriptionResult`
* remove now-obsolete `originalResult` symbol property
* fix typo, chores
* adjustment for compiler compat
* review feedback
* changeset
* api-reportuseQuery result handling (#11954)1 parent 0de03af commit 4a6e86a
File tree
16 files changed
+95
-123
lines changed- .api-reports
- .changeset
- src/react
- hooks
- types
16 files changed
+95
-123
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2303 | 2303 | | |
2304 | 2304 | | |
2305 | 2305 | | |
2306 | | - | |
2307 | | - | |
| 2306 | + | |
2308 | 2307 | | |
2309 | 2308 | | |
2310 | 2309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1695 | 1695 | | |
1696 | 1696 | | |
1697 | 1697 | | |
| 1698 | + | |
| 1699 | + | |
1698 | 1700 | | |
1699 | 1701 | | |
1700 | 1702 | | |
| |||
2328 | 2330 | | |
2329 | 2331 | | |
2330 | 2332 | | |
2331 | | - | |
2332 | | - | |
| 2333 | + | |
2333 | 2334 | | |
2334 | 2335 | | |
2335 | 2336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
| 1502 | + | |
| 1503 | + | |
1502 | 1504 | | |
1503 | 1505 | | |
1504 | 1506 | | |
| |||
1807 | 1809 | | |
1808 | 1810 | | |
1809 | 1811 | | |
1810 | | - | |
1811 | | - | |
| 1812 | + | |
1812 | 1813 | | |
1813 | 1814 | | |
1814 | 1815 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1427 | 1427 | | |
1428 | 1428 | | |
1429 | 1429 | | |
| 1430 | + | |
| 1431 | + | |
1430 | 1432 | | |
1431 | 1433 | | |
1432 | 1434 | | |
| |||
1727 | 1729 | | |
1728 | 1730 | | |
1729 | 1731 | | |
1730 | | - | |
1731 | | - | |
| 1732 | + | |
1732 | 1733 | | |
1733 | 1734 | | |
1734 | 1735 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1756 | 1756 | | |
1757 | 1757 | | |
1758 | 1758 | | |
1759 | | - | |
1760 | | - | |
| 1759 | + | |
1761 | 1760 | | |
1762 | 1761 | | |
1763 | 1762 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1560 | 1560 | | |
1561 | 1561 | | |
1562 | 1562 | | |
| 1563 | + | |
| 1564 | + | |
1563 | 1565 | | |
1564 | 1566 | | |
1565 | 1567 | | |
| |||
2152 | 2154 | | |
2153 | 2155 | | |
2154 | 2156 | | |
2155 | | - | |
2156 | | - | |
| 2157 | + | |
2157 | 2158 | | |
2158 | 2159 | | |
2159 | 2160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1622 | 1622 | | |
1623 | 1623 | | |
1624 | 1624 | | |
| 1625 | + | |
| 1626 | + | |
1625 | 1627 | | |
1626 | 1628 | | |
1627 | 1629 | | |
| |||
2215 | 2217 | | |
2216 | 2218 | | |
2217 | 2219 | | |
2218 | | - | |
2219 | | - | |
| 2220 | + | |
2220 | 2221 | | |
2221 | 2222 | | |
2222 | 2223 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1412 | 1412 | | |
1413 | 1413 | | |
1414 | 1414 | | |
| 1415 | + | |
| 1416 | + | |
1415 | 1417 | | |
1416 | 1418 | | |
1417 | 1419 | | |
| |||
1712 | 1714 | | |
1713 | 1715 | | |
1714 | 1716 | | |
1715 | | - | |
1716 | | - | |
| 1717 | + | |
1717 | 1718 | | |
1718 | 1719 | | |
1719 | 1720 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1782 | 1782 | | |
1783 | 1783 | | |
1784 | 1784 | | |
1785 | | - | |
1786 | | - | |
| 1785 | + | |
1787 | 1786 | | |
1788 | 1787 | | |
1789 | 1788 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1739 | 1739 | | |
1740 | 1740 | | |
1741 | 1741 | | |
1742 | | - | |
1743 | | - | |
| 1742 | + | |
1744 | 1743 | | |
1745 | 1744 | | |
1746 | 1745 | | |
| |||
0 commit comments