-
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
AWSAppSyncClient full support for local state in gql queries (Apollo 2.5) #369
Comments
Support for 2.5 would be great, the AWSAppSync is a blocker to using 2.5 with applications |
Agreed. Especially since Apollo themselves have said that |
Thanks for the report, this is on our backlog, we are doing some internal testing and PoC. I can't give an ETA, but we'll keep you posted in this issue |
We're also looking to remove |
Is there any work we can do, this is on the very top of our blocker list to NOT adapt AWSAppSync. @manueliglesias I understand an ETA is difficult to give but are we talking weeks or months out? If we don't get any indication we will need to choose a different platform as we are heavily relying on local resolvers. |
@ntziolis since the new Apollo 2.5 is building link state into its core, we're going to look to see what this entails rather than the I wouldn't say this work is imminent based on customer demand for other feature requests. That being said if you can give us an explicit example/code sample of the use case and behavior you're looking for it will help us to scope the work. |
As a new user evaluating appsync for my project this seems to be a pretty big blocker. Without this upgrade it sounds like we will end up writing a lot of code that will require a big refactor since upstream apollo has already said it is deprecated. |
@undefobj The use case is very simple: So you see this requirement is not about a code example but about the business case. The core thing local resolvers allowed us todo is to treat anything data related as "THE" backend of our app and lets our Frontend devs focus 100% on building features vs having to deal with data related tasks. Just to be clear, we need full support for local resolvers. I'm not sure this is 1:1 with supporting Apollos new state management. |
@undefobj I'm in the same situation as @ntziolis. As my team is using AWS AppSync as a backend and we opt to use An example in our last app was getting user data. When a user logs in, we get his |
Also looking forward to the safe client disposal of ApolloClient.stop(); introduced in 2.4.12 |
Any chance we could get an update on Apollo 2.5 support with an ETA? If its going to be a while then I'll probably migrate back to 2.4. |
Came up with a temporary solution by creating a new apollo client that solely handles local state. So Appsync will be the default client using the Apollo Client 2.4 with the old apollo-link-state but another apollo client will handle the local state with version 2.5. When we query or mutate in the components or view, Vue-Apollo lets us specify the apollo client to use per component or per query basis. Later when Appsync upgrades the package we can do some minor refactoring. I am new to the graphql world. If anyone thinks this is a terrible please let me know. It would be much appreciated :)
|
Anything new with this? |
Hating to have to create a "me too" comment, but this ticket has been open 5 months I would appreciate a further update on how likely we are to see this supported any time soon @undefobj ? Our use case is simple - try and consolidate our local state management to avoid using Redux for local state management and persistence with Apollo/AppSync for remote state/data. We'd also like to use the new React Hooks functionality that later versions of Apollo Client supports to simplify the boilerplate, but that's off topic for this issue. |
This started off as an annoyance, but unfortunately has quickly become a serious impediment to us. We're attempting to do a POC using AppSync and without any clear understanding on how to manage local state we're in danger of failing the POC. Because of that, I'm reflagging this to attempt to get some direction and update from the AWS team. @undefobj mentioned higher up about posting updates to this ticket as appropriate, but there's not been any update since the beginning of April, so I would greatly appreciate an update if at all possible. Has anyone been successful in using Apollo Client v2.4 to decorate server query results with additional fields stored as client local state? If so, I'd appreciate some direction. I did see this comment, but it's almost 18 months old and so not sure if it's still valid. That's my next avenue I'm attempting but not sure how it applies to decorating server query results with additional client fields. Alternatively I have seen some reports of manually upgrading |
😞 Just seen this comment from earlier this year not recommending using Apollo Link State with AppSync, so I guess that supercedes the comment I linked to above. It's more than a little frustrating to find such an exciting and promising technology such as AppSync showing such promise to simplify full-stack development and then take it all away with common use-cases being neglected such as local client data. I'm not meaning to rant, I'm just trying to provide some transparency to help convey the pain being felt. |
@danrivett I was in a similar spot. Gave up waiting on AppSync updates and moved my Proof of Concept onto a Postgres+Hasura stack. Very quick to recreate, feels more solid an implementation and more GraphQL-beginner friendly than AppSync anyway. |
@adav I also gave up on this library. I had workarounds for using local state with it using |
As mentioned in #448 : |
We are moving to another stack because of this issue. It looks like Amazon no longer maintain this project. Which is very sad. |
Yeh, similar for myself also.. |
@jordanranz Is there any headway on getting local state supported via client 2.5 |
Our team would benefit heavily from this being updated. |
Is there any updates on this issue? The lack of this feature is really slowing our team down |
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. |
It has been > 3 months since last update regarding this issue. What is happening? |
@undefobj Any news? Should we switch to Amplify Datastore (as it is low low low priority in the backlog) or it's still going to be resolved? |
@SebSchwartz @jonixj At this time I do not have an update on the ability for offline with the newer versions of Apollo. We are still researching this but there is still too much variability in the data model and controls of link state based on the controls available. At this time I would recommend that you leverage DataStore for offline use cases or if you would like to use the latest Apollo version leverage the Auth and Subscription links as outlined above. |
Is there going to be support for Apollo >2.5 with local state? I'm just getting back into using amplify and there seems to be no support for local (@client) data with aws appsync graphql server. |
You can use new Apollo versions with the |
@undefobj Is there a way to use |
Do you want to request a feature or report a bug?
Feature, please consider upgrading AWSAppSyncClient dependencies from Apollo 2.4 to Apollo 2.5
What is the current behavior?
Local state support in
Apollo 2.4
requires lots of boilerplate;What is the expected behavior?
Apollo 2.5
brings significant improvements by supporting injection of local state directly in the query variables with the @export directive.See also https://www.apollographql.com/docs/react/essentials/local-state.html#client-variables
Which versions and which environment (browser, react-native, nodejs) / OS are affected by this issue? Did this work in previous versions?
aws-appsync 1.7.2
The text was updated successfully, but these errors were encountered: