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
the page insinuates that simply following instructions will start synching data with the AppSync backend. that is not correct. synching only starts after an op is done:
@onlybakam "synching only starts after an op is done" What do you mean by this? If a developer starts locally, and then runs npm run amplify-push that syncs the data the cloud.
for the client: sync engine is initiated when start() is called. start() is not called in configure(). so unless user does a query/save/observe, no synchronization will happen.
this might sound like an odd thing. but there might be a situation where Amplify is initialized in a top level view/page but no Datastore CRUD operation is taken until user navigates to another view. we should be clear that if you want data to start synching right away, you should call Datastore.start(). (the function is now public. it wasnt when i first opened the issue)
I see your concern. Datastore.configure is similar to amplify.configure in that i has the config data which will be used when an API is called. When you use datastore operations like .save(), .query(), .observe() or .remove() the config is used and synced to the backend. Currently, this doesn't happen when .configure is called but rather on an API call due to the amount of data involved -- this can slow an app. Will close this as I believe this is explained. If i'm missing something, please ping this thread.
Page:
/lib/datastore/sync/q/platform/js
Feedback:
the page insinuates that simply following instructions will start synching data with the AppSync backend. that is not correct. synching only starts after an op is done:
https://github.com/aws-amplify/amplify-js/blob/e71fee58bdd940f5fbcd4268f08f53e2b85168bd/packages/datastore/src/datastore/datastore.ts#L798
really important distinction for customers building multi screen applications and/or components started dynamically.
The text was updated successfully, but these errors were encountered: