apollo-client-rxjs icon indicating copy to clipboard operation
apollo-client-rxjs copied to clipboard

Can't use with latest 2.x client?

Open kamranayub opened this issue 7 years ago • 5 comments

I think I'm trying to do something simple but not getting very far:

client.watchQuery({ query, variables })
  .map(response => doSomething(response.data))
  .subscribe(newData => {
  console.log(newData);
})

But I'm getting "map is undefined or not a function".

I'm guessing it's because this is written against 1.x beta and not 2.x?

kamranayub avatar Dec 27 '17 16:12 kamranayub

Just checking in on this as apollo-link now returns an "observable," but seems to have some different operators than those in RxJS. Any news?

loganpowell avatar Jan 29 '18 19:01 loganpowell

I won't update apollo-client-rxjs to support version 2.0 of apollo-client.

@loganpowell apollo-link uses zen-observable, not rxjs but this library won't get benefits from it because it's built on top of apollo-client.

kamilkisiela avatar Feb 03 '18 18:02 kamilkisiela

Thank you for the quick response @kamilkisiela ! Duly noted.

loganpowell avatar Feb 03 '18 20:02 loganpowell

it would be nice to add a note about that in the Readme.

abumalick avatar Dec 11 '18 14:12 abumalick

@abumalick PR welcome

kamilkisiela avatar Dec 11 '18 15:12 kamilkisiela