-
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
Apollo-client dependency version #436
Comments
Please upgrade apollo-client, it is very much needed for hooks support |
Any updates here? this is very much needed. |
|
@beezeebly Have you had any issues with the fixing the apollo client? Also hopeful that the apollo client can be bumped. Mainly for a resolution to the bug @miiihi 's pointed out, but also the new @apollo/react-hooks lib. |
Any news on this from the AppSync team? |
This really needs attention. We've addressed this by using Yarn's
|
Hello everyone - I want to reply and assure you that we have not abandoned support of this project. Per my earlier comment, this is a complex process and to be completely transparent there are things in the Apollo library that are out of our control and there have also been breaking changes in Apollo versions which we're trying to account for, which is also why we pinned the version. We've been spending many hours trying to account for this but it's not simple to solve. After putting more thought into this we've got some initial solutions that I hope will unblock many of you. What we've done is packaged two of the "Links" which are part of the SDK - the Auth and Subscription Links - and published them to NPM. This will allow you to include them in the newer Apollo versions if you wish to use the newer features. This does not include the "Offline Link" for offline support which is more complex to solve and we're looking into for the future. Installation of the links:
With is I would then give the following recommendations for choosing your client strategy:
Please let us know if you have any trouble using these links or if there is a scenario which we haven't accounted for here. |
|
I don't want to pile on to the issue that will already be a ton of work but merely want to point out that Apollo 3.0 is coming |
Is there any roadmap for apollo-client 3.0 support ? |
Ye, it very much seems this project has been abandoned now sadly. @ianmartorell I think the only solution for us (me) to write my own client which shouldn't be too hard in theory I believe. Still a shame though |
Hi, If you have a need for just Apollo 3 support without offline, we just published updated versions of the links See: #561 (comment) If you need offline support, we recommend you use Amplify DataStore |
Does this mean you have given up implementing offline support? The DataStore is not good if you want to use a query and get relationships. You have to make multiple queries. It is more like using an ORM in your frontend code. Which defeats a big part of the benefit of using GraphQL. This is more like going back to a REST API. To follow relationships DataStore uses the following code:
This means that it first retrieves all of the comments then filters them on the client based on the post id. This is only reasonable for a small dataset. Not to mention, dynamodb has a restriction of only 1MB. So, how are you going to page all of the objects to filter out the unwanted comments? This is also not secure in a multi-tenant environment. How can this be the suggested solution except for small applications? There is also this approach to query the data:
This is making the UI call the database directly. No possibility to implement some real security checks. It would also open you API up to attack. . A hacker can just open up the console, and start calling your API with whatever conditions they want. So, they can start to query data for more than a single customer. If your permission model (multi-tenant) does not support being able to add trivial aws user id to the API. In the case of the multi-tenant a user can belong to more then one tenant. You have to check if the user has access to the tenant that owns the resource. Since the user can belong to more than one tenant the cognito mappings suggested do not work either. So, you have to do the work in the resolvers. |
Latest aws-appsync is using apollo-client@2.4.6, which is more than 9 months old and has at least one serious bug (solved already, see apollographql/apollo-client#4352).
Are there any obstacles to update to latest versions of dependant libraries? And plans about that?
Thanks, miiihi
The text was updated successfully, but these errors were encountered: