-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: using apollo core to avoid loading react #613
Conversation
Hi, is there anything holding back this PR? Do you need more information? |
Having the same issue too, here is another PR fixing the same issue: #599 @manueliglesias @elorzafe @dabit3 is there a way to get this fix in? |
Will this PR be merged? It's been 2 months. |
@elorzafe can you please check out this PR? The wrong imports break a lot of non-react ts projects |
Same issue here. I'd be happy to see this PR get merged. :) |
Looking forward to this merge. Would help alot with use Vue for AppSync |
Looking forward to this merge. It would reduce significantly the dependencies of our AWS Lambda and hence its cold start time. |
Unfortunately AWS employees get raises and promotions for shipping new features and services but not for maintaining anything. We see the limitations of this approach to incentivizing employees here. |
Apologizes folks for missing this! I do have some people looking into this now. Thanks for raising this up @revmischa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR, @clemkoa! Unfortunately, it looks like we've already updated all the imports, so this PR is no longer needed.
Issue:
#611
Description of changes:
As described in the issue, the apollo client loads react by default which is not optimal. Instead of using
@apollo/client
I import@apollo/client/core
which is just the apollo functions needed!The apollo team described the migration process on this page: https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/ . They use the package
@apollo/client
because they are in a react project. As described here https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/#using-apollo-client-without-react, "Apollo Client 3.0 includes built-in support for React hooks, but it absolutely still supports non-React view layers. To use Apollo Client 3.0 with Vue, Angular, or another view layer of your choosing, import ApolloClient from the @apollo/client/core entry point". Importing@apollo/client/core
works with all js frameworks and doesn't force react to be loaded.Happy to modify if you have feedback