Skip to content
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

Release 3.8.0 #10340

Merged
merged 201 commits into from
Aug 2, 2023
Merged

Release 3.8.0 #10340

merged 201 commits into from
Aug 2, 2023

Conversation

alessbell
Copy link
Contributor

@alessbell alessbell commented Dec 8, 2022

Like the Release 3.7.0 PR, this PR will serve to collect significant new features, deprecation warnings, and minor breaking changes that we intend to release in @apollo/client@3.8.0.

If you want to test these changes, run

npm i @apollo/client@3.8.0-alpha.n

in your application, where the n in -alpha.n comes from the most recent commit message like

Bump @apollo/client npm version to 3.8.0-alpha.n.

Until v3.8.0 is released, we can continue merging smaller changes into main and releasing them, without worrying about larger changes on the release-3.8 branch.

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2022

🦋 Changeset detected

Latest commit: ec1b864

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

This PR includes changesets to release 1 package
Name Type
@apollo/client 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

jerelmiller and others added 21 commits December 9, 2022 16:29
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add support for @defer queries in useSuspenseQuery

* Add test to verify deferred queries work with lists

* Add more tests to ensure deferred queries work with various conditions

* Add tests to ensure cached data is properly returned with deferred queries

* Add tests to check error behavior returned by first chunk

* Add handling of errors returned in deferred chunks

* Add tests to validate errorPolicy behavior with deferred queries

* Slight change to verbiage in test

* Add test to verify partial data with returnPartialData

* Update bundlesize

* Rename function to better convey intent

* Enable skipped tests since fix is merged to `main`

* Add changeset

* Update comment for reobserveAsConcast

* Update bundlesize

* Update bundlesize

Co-authored-by: Alessia Bellisario <alessia@apollographql.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
#10346)

* Add test to ensure client directive is stripped from the query

* Add option to toggle whether @client directives are removed

* Add tests for the client to prove client fields can be removed via options

* Remove unused import

* Remove client-only fields in HttpLink

* Remove client-only fields in BatchHttpLink

* Minor changes to how test is setup for better readability

* Add changeset

* Fix some code formatting

* Minor change to name of some tests

* Update bundlesize

* Update error message to be less ambiguous

Co-authored-by: Alessia Bellisario <alessia@apollographql.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rver (#10399)

* fix: silence useLayoutEffect warning when useSuspenseQuery run on server

* chore: bump bundlesize to 33.19kb (was 33.17kb)

* chore: adds changeset

* chore: move hook to src/react/hooks/internal
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…ror policy (#10401)

* Update tests to ensure network errors are always thrown

* Always throw network errors from useSuspenseQuery

* Add changeset
alessbell and others added 10 commits July 13, 2023 13:09
This removes `SuspenseCache` from the `Provider` options, and instead creates a `SuspenseCache` the first time it is requested by `getSuspenseCache`. It will be saved as a property on the `ApolloClient` instance, so those two instances will always be tied together.

Configuration options can now be passed in as part of the `ApolloClient` configuration:

```js
new ApolloClient({
  react: {
    suspense: {
      autoDisposeTimeoutMs: 60_000
    }
  }
})
```
…1058)

Propagate `AbortError`s to the user when a user-provided `signal` is passed to the link. Previously, these links would swallow all `AbortErrors`, potentially causing queries and mutations to never resolve. As a result of this change, users are now expected to handle `AbortError`s when passing in a user-provided `signal`.
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
… that is deeply equal to data in the cache (#11086)

Fixes an issue where a call to `refetch`, `fetchMore`, or changing `skip` to `false` that returned a result deeply equal to data in the cache would get stuck in a pending state and never resolve. This meant the Suspense fallback would be displayed indefinitely.
* Restore Apollo Client 3.7 `getApolloContext` behaviour

* update size-limits

---------

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
@jerelmiller jerelmiller requested a review from a team as a code owner July 27, 2023 23:43
phryneas and others added 9 commits July 28, 2023 09:42
* work on useFragment timing

* changeset

* all tests green

* remove most `IS_REACT_18` checks

* changeset

* Update src/react/hooks/useQuery.ts

* Update .changeset/honest-ads-act.md

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>

* feedback from code review

---------

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
* flip .prettierignore to list ignored files
* apply formatting to currently not-ignored files
* upgrade prettier to v3
* apply agreed-up change to `"singleQuote": false`
* move prettier config into file
* format integration-tests
* format config folder
* ignore snap files per default
* format the whole non-ignored repo
* format `react` folder tests
* format `react` folder
* Enforce `export type` for all type-level exports.

* Apply suggestions from code review

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>

* format some more files

---------

Co-authored-by: Jerel Miller <jerelmiller@gmail.com>
…seBackgroundQuery` and soft deprecates `skip` option (#11112)

Adds support for a new `skipToken` sentinel that can be passed as options to `useSuspenseQuery` and `useBackgroundQuery`. This works in place of `skip` for both of these hooks. As such, the `skip` option is now labeled as `deprecated` to nudge people to use this feature, which is generally more type-safe than the `skip` option.

This also changes the way `queryRef` is returned when `skip` is true or `skipToken` is used with `useBackgroundQuery`. Previously, a `queryRef` would always be returned, regardless of whether query execution was skipped. This has been updated to conditionally return a queryRef only when query execution is enabled. `undefined` is returned when initializing the hook skipped.

---------

Co-authored-by: Lenz Weber-Tronic <lorenz.weber-tronic@apollographql.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
…rs (#11119)

* Refactor tests to remove RefetchFunction/FetchMoreFunction type helpers

* chore: use "on" prefix in prop names
@bignimbus bignimbus requested review from bignimbus and removed request for StephenBarlow August 2, 2023 15:19
Copy link
Contributor

@bignimbus bignimbus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@alessbell alessbell merged commit f54b86d into main Aug 2, 2023
This was referenced Aug 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants