refactor: refetch on change

This commit is contained in:
Carlos Valente
2024-09-01 12:50:01 +02:00
committed by Carlos Valente
parent 7b932ef0f7
commit 0abaf7724d
6 changed files with 31 additions and 9 deletions
@@ -247,7 +247,11 @@ function notifyChanges(options: { timer?: boolean | string[]; external?: boolean
if (options.external) {
// advice socket subscribers of change
sendRefetch(Array.isArray(options.timer) ? options.timer : undefined);
const payload = {
changes: Array.isArray(options.timer) ? options.timer : undefined,
revision: cache.getMetadata().revision,
};
sendRefetch(payload);
}
}