diff --git a/packages/datastore/src/sync/index.ts b/packages/datastore/src/sync/index.ts index b83ca81ce4e..526fced2a6a 100644 --- a/packages/datastore/src/sync/index.ts +++ b/packages/datastore/src/sync/index.ts @@ -137,6 +137,7 @@ export class SyncEngine { new Reachability().networkMonitor().subscribe(async ({ online }) => { this.online = online; if (online) { + //#region GraphQL Subscriptions const [ ctlSubsObservable, dataSubsObservable, @@ -151,6 +152,9 @@ export class SyncEngine { } logger.log('Realtime ready'); + //#endregion + + //#region Base & Sync queries const currentTimeStamp = new Date().getTime(); const modelLastSync: Map< @@ -181,8 +185,9 @@ export class SyncEngine { observer.error(err); return; } + //#endregion - // process mutations + //#region process mutations subscriptions.push( this.mutationsProcessor .start() @@ -201,8 +206,9 @@ export class SyncEngine { } ) ); + //#endregion - // TODO: extract to funciton + // TODO: extract to function subscriptions.push( dataSubsObservable.subscribe( ([_transformerMutationType, modelDefinition, item]) => {