Open droidgeek1 opened 3 years ago
Chrome/Safari prints following every minute. Not sure if its related but Observer is null ..
[DEBUG] 12:26.788 AWSAppSyncRealTimeProvider {id: "", observer: null, query: "", variables: {…}}id: ""observer: nullquery: ""variables: {}proto: Object ConsoleLogger.js:97
Also just to be clear, the real time sync works perfectly fine when SAME user is signed in from both browsers. So this points and confirms that something with Group Members that is not doing real time sync
Bottomline - real time sync works for same owner but not for different owners in the same group. Is this a bug or pending feature? Could I be doing something wrong? Appreciate help from the experts. It works eventually and I am not sure what determines the timeline of this eventual sync. Is it configurable?
@iartemiev Thanks for adding to DataStore tag. Do we have an update on this - at least to tell me if I should expect REAL TIME update to mulitple users in a group when group is defined by one of the columns of the Entity in graphQL schema? This would be a show stopper if there is no way to have real time sync across users in the group.
@iartemiev Following up again - Just need Yes or No responses at this time to the following question so I can decide. I understand you gus are busy building amazing product so I am now asking for a Y or N answer at this time. If you could direct me to right person that would be great to too. Is it possible to get near REAL TIME ( 10 seconds) update to multiple users in a group when group is defined by one of the columns of the Model in graphQL schema?
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
Authentication, DataStore
Amplify Categories
auth, function, api
Environment information
Describe the bug
Using Datastore with auth rules of owner and group. GroupField is one of the fields on the entity. Expo Web App inserts/updates data from two different browsers with two different logins using Cognito auth. I have subscribed for updates. I get updates after few hours but not in real time. If I refresh the App or reload the App, then I get updates right-away. I see Observe method called whenever updates happen. Problem is it is not getting called in REAL time. WHat could I be missing ? Again, if I reload the browser, I get updates made right-away. Also underlying DynamoDB is updated instantly. I can see that but that data is not pushed to the other client who did not make a change but is 'observing'. I have two observers just to be sure, one gets registered after DataStore is 'READY' and one immediately in useEffect after DataStore.start(). Most of the time it's the later one that get's fired after few hours as seen from the chrome/safari console.
type SampleEntity @model @auth(rules: [{ allow: owner }, { allow: groups, groupsField: "sampleGroupField" }]) { id: ID! sampleGroupField: ID! owner: String firstName: String }
Expected behavior
Expecing both chrome and safari logged users to get data in realtime instead of delayed
Reproduction steps
Create the entity as I shown above and insert data from two different client/browsers. Datastore does not fire real-time updates
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response