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
Currently when creating records offline we make use of Apollo's optimistic response so the offline records can be displayed in the UI and then automatically persisted to the database when the app regains connectivity. This works well for records that are not related to other records but can become complex for related records. Specially for creating new service entries and associated new clients.
With the current solution, service entries are created without their associated client and then updated once the client record has been persisted. Since we don't control the order of record creation when the app regains connectivity a map of service entries to clients must be maintained in order to know what service entries need to be updated (it's possible the client creation request returns before the service entry request).
A better solution might be to take advantage of some graphQL features so that offline service entries and associated clients can be sent in one request.
The text was updated successfully, but these errors were encountered:
Currently when creating records offline we make use of Apollo's optimistic response so the offline records can be displayed in the UI and then automatically persisted to the database when the app regains connectivity. This works well for records that are not related to other records but can become complex for related records. Specially for creating new service entries and associated new clients.
With the current solution, service entries are created without their associated client and then updated once the client record has been persisted. Since we don't control the order of record creation when the app regains connectivity a map of service entries to clients must be maintained in order to know what service entries need to be updated (it's possible the client creation request returns before the service entry request).
A better solution might be to take advantage of some graphQL features so that offline service entries and associated clients can be sent in one request.
The text was updated successfully, but these errors were encountered: