Skip to content

Conversation

PowerKiKi
Copy link
Collaborator

Work in process to migrate to the future apollo-client v4 and its native RxJS support via apollographql/apollo-client#12384

Work in process to migrate to the future apollo-client v4 and its native
RxJS support via apollographql/apollo-client#12384
Copy link

changeset-bot bot commented Mar 6, 2025

⚠️ No Changeset found

Latest commit: 94d347e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Mar 6, 2025

💻 Website Preview

The latest changes are available as preview in: https://29013a7b.apollo-angular.pages.dev

@jerelmiller
Copy link

@PowerKiKi FYI we released a codemod with Apollo Client 4.0 that I think might be useful to you here. It not only updates the import locations, but will update to the new types as well (i.e. FetchResult -> ApolloLink.Result, etc.). See running it here: https://www.apollographql.com/docs/react/migrating/apollo-client-4-migration#running-the-codemod

Comment on lines +68 to +70
return new Observable(subscriber => {
return obsQuery.subscribe(subscriber);
});

Choose a reason for hiding this comment

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

FYI ObservableQuery implements the InteropObservable interface, so you should be able to simplify this to:

import { from } from "rxjs";

// ...

return from(obsQuery);

@jerelmiller
Copy link

I started a v4 branch to continue these changes in #2372. I'd like to do a bit more with that, but figured I'd open what I have finished so we can start a discussion on some of those changes 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants