You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To use the documentation examples, initially this user isn't allowed to use any Posts. The app will start up, full sync Posts (giving nothing) and sets the LastSyncMetadata saying this model has been synced.
A GraphQL mutation is observed and the user is now allowed to view Posts, so changeSync() is called setting the syncPosts flag and restarting datastore (stop & start, not clear).
I would expect the Post model to retrieve all of the posts, as that is now the predicate, not just the posts that were updated since the last sync attempt.
A GraphQL mutation is observed and the user is now NOT allowed to view Posts again, unfortunately the only way to remove all Post from the local data is a DataStore.clear() but this clears the whole database, which contains wanted information and would require a complete database sync again.
Summary:
I would like a way to perform a full sync on a specific model
I would like a way to clear a specific model
The text was updated successfully, but these errors were encountered:
Before opening, please confirm:
Language and Async Model
Kotlin
Amplify Categories
DataStore
Gradle script dependencies
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/lib/datastore/sync/q/platform/android/#clear-local-data
https://docs.amplify.aws/lib/datastore/sync/q/platform/android/#reevaluate-expressions-at-runtime
Describe the feature request
I'm currently working on a feature to allow set roles and permissions and cannot clear or full sync a specific model if needed at runtime.
To use the documentation examples, initially this user isn't allowed to use any Posts. The app will start up, full sync Posts (giving nothing) and sets the LastSyncMetadata saying this model has been synced.
A GraphQL mutation is observed and the user is now allowed to view Posts, so changeSync() is called setting the syncPosts flag and restarting datastore (stop & start, not clear).
I would expect the Post model to retrieve all of the posts, as that is now the predicate, not just the posts that were updated since the last sync attempt.
A GraphQL mutation is observed and the user is now NOT allowed to view Posts again, unfortunately the only way to remove all Post from the local data is a DataStore.clear() but this clears the whole database, which contains wanted information and would require a complete database sync again.
Summary:
The text was updated successfully, but these errors were encountered: