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

Version Packages (alpha) #11353

Merged
merged 1 commit into from Dec 5, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 9, 2023

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-3.9, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

release-3.9 is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on release-3.9.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@apollo/client@3.9.0-alpha.5

Minor Changes

  • #11345 1759066a8 Thanks @phryneas! - QueryManager.inFlightLinkObservables now uses a strong Trie as an internal data structure.

    Warning: requires @apollo/experimental-nextjs-app-support update

    If you are using @apollo/experimental-nextjs-app-support, you will need to update that to at least 0.5.2, as it accesses this internal data structure.

  • #11300 a8158733c Thanks @jerelmiller! - Introduces a new useLoadableQuery hook. This hook works similarly to useBackgroundQuery in that it returns a queryRef that can be used to suspend a component via the useReadQuery hook. It provides a more ergonomic way to load the query during a user interaction (for example when wanting to preload some data) that would otherwise be clunky with useBackgroundQuery.

    function App() {
      const [loadQuery, queryRef, { refetch, fetchMore, reset }] =
        useLoadableQuery(query, options);
    
      return (
        <>
          <button onClick={() => loadQuery(variables)}>Load query</button>
          <Suspense fallback={<SuspenseFallback />}>
            {queryRef && <Child queryRef={queryRef} />}
          </Suspense>
        </>
      );
    }
    
    function Child({ queryRef }) {
      const { data } = useReadQuery(queryRef);
    
      // ...
    }

Patch Changes

  • #11356 cc4ac7e19 Thanks @phryneas! - Fix a potential memory leak in FragmentRegistry.transform and FragmentRegistry.findFragmentSpreads that would hold on to passed-in DocumentNodes for too long.

  • #11370 25e2cb431 Thanks @phryneas! - parse function: improve memory management

    • use LRU WeakCache instead of Map to keep a limited number of parsed results
    • cache is initiated lazily, only when needed
    • expose parse.resetCache() method
  • #11389 139acd115 Thanks @phryneas! - documentTransform: use optimism and WeakCache instead of directly storing data on the Trie

  • #11358 7d939f80f Thanks @phryneas! - Fixes a potential memory leak in Concast that might have been triggered when Concast was used outside of Apollo Client.

  • #11344 bd2667619 Thanks @phryneas! - Add a resetCache method to DocumentTransform and hook InMemoryCache.addTypenameTransform up to InMemoryCache.gc

  • #11367 30d17bfeb Thanks @phryneas! - print: use WeakCache instead of WeakMap

  • #11385 d9ca4f082 Thanks @phryneas! - ensure defaultContext is also used for mutations and subscriptions

  • #11387 4dce8673b Thanks @phryneas! - QueryManager.transformCache: use WeakCache instead of WeakMap

  • #11371 ebd8fe2c1 Thanks @phryneas! - Clarify types of EntityStore.makeCacheKey.

  • #11355 7d8e18493 Thanks @phryneas! - InMemoryCache.gc now also triggers FragmentRegistry.resetCaches (if there is a FragmentRegistry)

@github-actions github-actions bot force-pushed the changeset-release/release-3.9 branch 6 times, most recently from b0870ac to 58b8433 Compare November 20, 2023 16:38
@github-actions github-actions bot force-pushed the changeset-release/release-3.9 branch from 58b8433 to 2c864f9 Compare November 21, 2023 19:20
@github-actions github-actions bot force-pushed the changeset-release/release-3.9 branch 2 times, most recently from e2b0c4a to 9698ad7 Compare November 28, 2023 23:44
@github-actions github-actions bot force-pushed the changeset-release/release-3.9 branch 13 times, most recently from adb6963 to 2ed4230 Compare December 4, 2023 09:27
@github-actions github-actions bot force-pushed the changeset-release/release-3.9 branch from 2ed4230 to 44ae686 Compare December 5, 2023 00:04
@github-actions github-actions bot added the auto-cleanup 🤖 label Dec 5, 2023
@jerelmiller jerelmiller merged commit 838095b into release-3.9 Dec 5, 2023
24 checks passed
@jerelmiller jerelmiller deleted the changeset-release/release-3.9 branch December 5, 2023 00:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant