-
Notifications
You must be signed in to change notification settings - Fork 247
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
Amplify Datatstore - change in graphql shema raised error "Failure performing sync query to AppSync" #496
Comments
When using amplify admin UI, if a content record is removed manully from the console, the same record still exists in dynamo db - which causes the above AppSync failing to sync error. There is so much rigidity with in the application. Not only this specific error, my development time doubled due to using amplify(i know its still beta) |
Hi @rajesh-kc thanks for reporting this issue, and sorry to hear about the trouble you encountered. From the logs you provided, it looks like the datastore was trying to sync data (written in local storage prior to the latest breaking schema change) during the initial sync, and it raised type mis-match error. The library will throw exception to let developers know about this breaking change caused issue. After this error, the datastore will work on LOCAL_ONLY mode. This is sort of expected, as this error is caused by breaking change of the schema. I often confused/frustrated by this kind of issue too! Here's some tips may be useful from my personal experience:
Hope this helps, and please feel free to follow up if you have any questions. |
This is a bug report I just filed that includes a couple of bugs I found and the workarounds to each |
I do have a question: How can I fully delete old data that no longer follows the schema? I do believe that my issues (see previous post) are related to the data not being deleted... |
Describe the bug
New posts not saving to aws amplify datastore, instead storing posts locally at app level. Graphql Schema changes to API are successfully pushed to server, but "type mismatch error" is raised
ERROR:
Initial cloud sync failed.
DataStoreException{message=Failure performing sync query to AppSync: [GraphQLResponse.Error{message='Can't resolve value (/syncArticles/items[0]/file) : type mismatch error, expected type LIST', locations='null', path='[GraphQLPathSegment{value='syncArticles'}, GraphQLPathSegment{value='items'}, GraphQLPathSegment{value='0'}, GraphQLPathSegment{value='file'}]', extensions='null'}], cause=null, recoverySuggestion=Sorry, we don't have a suggested fix for this error yet.}
Orchestrator transitioning from SYNC_VIA_API to LOCAL_ONLY
Setting currentState to LOCAL_ONLY
On Graphql schema, a field datatype is changed from String to List([String]). Amplify model is generated. API Change is pushed to aws amplify. On amplify backend UI, code is deployed and saved.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
New post should be saved to amplify datastore service or failed, but not to local storage at app level
Screenshots
Screenshots are added
Platform
Amplify Flutter current supports iOS and Android. This issue is reproducible in (check all that apply):
[] Android only
Output of
flutter doctor -v
Smartphone (please complete the following information):
Additional context
Why is new post being saved to LOCAL when API sync fails, instead of failing. There were no configuration settings to modify this behaviour
The text was updated successfully, but these errors were encountered: