github apollographql/apollo-client v4.0.0-alpha.6

pre-releaseone day ago

Major Changes

  • #12485 d338303 Thanks @jerelmiller! - Throw an error for queries and mutations if the link chain completes without emitting a value.

  • #12484 9a8b9ce Thanks @jerelmiller! - Remove loading, networkStatus, and partial properties on all promise-based query APIs. These properties were mostly static and were unnecessary since promise resolution guaranteed that the query was not longer loading.

    This affects the following APIs:

    • client.query
    • client.refetchQueries
    • client.reFetchObservableQueries
    • client.resetStore
    • observableQuery.fetchMore
    • observableQuery.refetch
    • observableQuery.reobserve
    • observableQuery.setVariables
    • The useLazyQuery execute function

Minor Changes

  • #12497 ff2cbe1 Thanks @jerelmiller! - Add a data property to CombinedGraphQLErrors that captures any partial data returned by the GraphQL response when errors are also returned.

  • #12488 c98b633 Thanks @phryneas! - Add a new method for static SSR of React components, prerenderStatic.
    The old methods, getDataFromTree, getMarkupFromTree and renderToStringWithData
    have been deprecated in favor of prerenderStatic.

    If used with React 19 and the prerender or prerenderToNodeStream apis from
    react-dom/static, this method can now be used to SSR-prerender suspense-enabled
    hook APIs.

Don't miss a new apollo-client release

NewReleases is sending notifications on new releases.