aws-mobile-appsync-sdk-js icon indicating copy to clipboard operation
aws-mobile-appsync-sdk-js copied to clipboard

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

Open yaquawa opened this issue 4 years ago • 8 comments

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

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

yaquawa avatar Dec 24 '20 08:12 yaquawa

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

janpapenbrock avatar Mar 06 '21 08:03 janpapenbrock

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

yaquawa avatar Mar 19 '21 04:03 yaquawa

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

  • https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/613 (4 files)
  • https://github.com/awslabs/aws-mobile-appsync-sdk-js/pull/599 (7 files, appears to be more complete)

janpapenbrock avatar Mar 19 '21 08:03 janpapenbrock

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?

yaquawa avatar Mar 19 '21 12:03 yaquawa

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.

janpapenbrock avatar Mar 19 '21 18:03 janpapenbrock

@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 avatar Mar 19 '21 19:03 volkanunsal

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

volkanunsal avatar Mar 19 '21 19:03 volkanunsal

@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.

yaquawa avatar Mar 20 '21 02:03 yaquawa