awslabs / aws-mobile-appsync-sdk-js

JavaScript library files for Offline, Sync, Sigv4. includes support for React Native
Apache License 2.0
920 stars 266 forks source link

Importing from `@apollo/client` force user to use `react` #611

Open yaquawa opened 3 years ago

yaquawa commented 3 years ago

See the issue at here https://github.com/apollographql/apollo-client/issues/7318#issuecomment-749088769

Use @apollo/client/core instead of @apollo/client.

janpapenbrock commented 3 years ago

Also, here's the reference to the official documentation on how to use @apollo/client without react: https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/#using-apollo-client-without-react

yaquawa commented 3 years ago

Please.. fix this... it won't take that much time.

janpapenbrock commented 3 years ago

There's also some PRs open to address this issue:

yaquawa commented 3 years ago

Hey @janpapenbrock thanks ! and I saw many PRs in this repo that really should be merged but all of them are ignored without a single word, I was thinking this repo is dead despite it's the aws official one...

but, to be honest, I'm not so surprised, because I've seen many of the aws official repo seems like in the state of asphyxia. All the dependencies are just too old, just want to know if there is any alternative repo for this?

janpapenbrock commented 3 years ago

I saw that @volkanunsal is working on migrating to aws sdk v3 in their fork https://github.com/volkanunsal/aws-mobile-appsync-sdk-js but I think that is currently also using @apollo/client imports.

volkanunsal commented 3 years ago

@janpapenbrock FYI, I had to remove a bunch of features along the way, such as offline sync and conflict resolution, because I didn't need them, and they were complicated to maintain.

volkanunsal commented 3 years ago

Another caveat, if you're using aws-sdk v3 as well, you will also need to rewrite auth-link.

yaquawa commented 3 years ago

@volkanunsal here is the PR for update to awk-sdk v3 https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/625 , but, ignored as usual.