Skip to content

Releases: apollographql/apollo-client

v3.8.0-beta.2

03 Aug 09:55
941f3d8
Compare
Choose a tag to compare
v3.8.0-beta.2 Pre-release
Pre-release

3.8.0-beta.2

Patch Changes

v3.8.0-beta.1

03 Aug 09:55
0d79613
Compare
Choose a tag to compare
v3.8.0-beta.1 Pre-release
Pre-release

3.8.0-beta.1

Patch Changes

  • #10937 eea44eb87 Thanks @jerelmiller! - Moves DocumentTransform to the utilities sub-package to avoid a circular dependency between the core and cache sub-packages.

  • #10919 f796ce1ac Thanks @jerelmiller! - Fix an issue when using a link that relied on operation.getContext and operation.setContext would error out when it was declared after the removeTypenameFromVariables link.

v3.8.0-beta.0

03 Aug 09:55
a445e44
Compare
Choose a tag to compare
v3.8.0-beta.0 Pre-release
Pre-release

3.8.0-beta.0

Minor Changes

  • #10887 f8c0b965d Thanks @phryneas! - Add a new mechanism for Error Extraction to reduce bundle size by including
    error message texts on an opt-in basis.
    By default, errors will link to an error page with the entire error message.
    This replaces "development" and "production" errors and works without
    additional bundler configuration.
    Bundling the text of error messages and development warnings can be enabled by

    import { loadErrorMessages, loadDevMessages } from "@apollo/client/dev";
    if (process.env.NODE_ENV !== "production") {
      loadErrorMessages();
      loadDevMessages();
    }
  • #10509 79df2c7ba Thanks @jerelmiller! - Add the ability to specify custom GraphQL document transforms. These transforms are run before reading data from the cache, before local state is resolved, and before the query document is sent through the link chain.

    To register a custom document transform, create a transform using the DocumentTransform class and pass it to the documentTransform option on ApolloClient.

    import { DocumentTransform } from "@apollo/client";
    
    const documentTransform = new DocumentTransform((document) => {
      // do something with `document`
      return transformedDocument;
    });
    
    const client = new ApolloClient({ documentTransform: documentTransform });

    For additional documentation on the behavior and API of DocumentTransform, see the pull request.

  • #10916 ea75e18de Thanks @alessbell! - Remove experimental labels from hooks, move to beta.

v3.7.15

26 May 16:31
4d19216
Compare
Choose a tag to compare

Patch Changes

  • #10891 ab42a5c08 Thanks @laverdet! - Fixes a bug in how multipart responses are read when using @defer. When reading a multipart body, HttpLink no longer attempts to parse the boundary (e.g. "---" or other boundary string) within the response data itself, only when reading the beginning of each mulitpart chunked message.

  • #10789 23a4e1578 Thanks @phryneas! - Fix a bug where other fields could be aliased to __typename or id, in which case an incoming result would be merged into the wrong cache entry.

New Contributors

v3.8.0-alpha.15

03 Aug 09:55
fb95eca
Compare
Choose a tag to compare
v3.8.0-alpha.15 Pre-release
Pre-release

3.8.0-alpha.15

Patch Changes

v3.8.0-alpha.14

03 Aug 09:55
875051c
Compare
Choose a tag to compare
v3.8.0-alpha.14 Pre-release
Pre-release

3.8.0-alpha.14

Minor Changes

  • #10755 e3c676deb Thanks @alessbell! - Feature: adds useBackgroundQuery and useReadQuery hooks

  • #10853 300957960 Thanks @jerelmiller! - Introduce the new removeTypenameFromVariables link. This link will automatically remove __typename fields from variables for all operations. This link can be configured to exclude JSON-scalars for scalars that utilize __typename.

    This change undoes some work from #10724 where __typename was automatically stripped for all operations with no configuration. This was determined to be a breaking change and therefore moved into this link.

Patch Changes

  • #10869 ba1d06166 Thanks @phryneas! - Ensure Context value stability when rerendering ApolloProvider with the same client and/or suspenseCache prop

  • #10789 23a4e1578 Thanks @phryneas! - Fix a bug where other fields could be aliased to __typename or id, in which case an incoming result would be merged into the wrong cache entry.

  • #10765 35f36c5aa Thanks @phryneas! - More robust types for the data property on UseFragmentResult. When a partial result is given, the type is now correctly set to Partial<TData>.

  • #10852 27fbdb3f9 Thanks @phryneas! - Chore: Add ESLint rule for consistent type imports, apply autofix

  • #10877 f40248598 Thanks @phryneas! - Change an import in useQuery and useMutation that added an unnecessary runtime dependency on @apollo/client/core. This drastically reduces the bundle size of each the hooks.

  • #10836 6794893c2 Thanks @phryneas! - Remove the deprecated returnPartialData option from useFragment hook.

  • #10872 96b4f8837 Thanks @phryneas! - The "per-React-Version-Singleton" ApolloContext is now stored on globalThis, not React.createContext, and throws an error message when accessed from React Server Components.

v3.8.0-alpha.13

03 Aug 09:55
707c9cc
Compare
Choose a tag to compare
v3.8.0-alpha.13 Pre-release
Pre-release

3.8.0-alpha.13

Patch Changes

  • #10766 ffb179e55 Thanks @jerelmiller! - More robust typings for the data property returned from useSuspenseQuery when using returnPartialData: true or an errorPolicy of all or ignore. TData now defaults to unknown instead of any.

  • #10809 49d28f764 Thanks @jerelmiller! - Fixed the ability to use refetch and fetchMore with React's startTransition. The hook will now behave correctly by allowing React to avoid showing the Suspense fallback when these functions are wrapped by startTransition. This change deprecates the suspensePolicy option in favor of startTransition.

v3.7.14

03 May 20:45
f216df6
Compare
Choose a tag to compare

Patch Changes

  • #10764 1b0a61fe5 Thanks @phryneas! - Deprecate useFragment returnPartialData option

  • #10810 a6252774f Thanks @dleavitt! - Fix type signature of ServerError.

    In <3.7 HttpLink and BatchHttpLink would return a ServerError.message of e.g. "Unexpected token 'E', \"Error! Foo bar\" is not valid JSON" and a ServerError.result of undefined in the case where a server returned a >= 300 response code with a response body containing a string that could not be parsed as JSON.

    In >=3.7, message became e.g. Response not successful: Received status code 302 and result became the string from the response body, however the type in ServerError.result was not updated to include the string type, which is now properly reflected.

v3.7.13

27 Apr 21:31
9e4d72c
Compare
Choose a tag to compare

Patch Changes

  • #10805 a5503666c Thanks @phryneas! - Fix a potential memory leak in SSR scenarios when many persistedQuery instances were created over time.

  • #10718 577c68bdd Thanks @Hsifnus! - Delay Concast subscription teardown slightly in useSubscription to prevent unexpected Concast teardown when one useSubscription hook tears down its in-flight Concast subscription immediately followed by another useSubscription hook reusing and subscribing to that same Concast

v3.8.0-alpha.12

03 Aug 09:55
abf3b49
Compare
Choose a tag to compare
v3.8.0-alpha.12 Pre-release
Pre-release

3.8.0-alpha.12

Minor Changes

  • #10722 c7e60f83d Thanks @benjamn! - Implement a @nonreactive directive for selectively skipping reactive comparisons of query result subtrees

Patch Changes