Skip to content

feat: add broadcast api based cross tab sync - #3868

Closed
m1212e wants to merge 1 commit into
urql-graphql:mainfrom
m1212e:cross-tab-cache-sync
Closed

feat: add broadcast api based cross tab sync#3868
m1212e wants to merge 1 commit into
urql-graphql:mainfrom
m1212e:cross-tab-cache-sync

Conversation

@m1212e

@m1212e m1212e commented May 3, 2026

Copy link
Copy Markdown

Summary

This is an attempt of syncing the cache between tabs via the Broadcast Channel API. I found it useful while operating an app that uses two tabs as a control and presentation view. Without, the optimistic mutations made in the control view do not immediately show up in the presentation view. This is more a proof of concept to hear your opinion on this strategy, looking forward for your feedback! It is still work in progress.

@changeset-bot

changeset-bot Bot commented May 3, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a33445c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@urql/exchange-graphcache Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@JoviDeCroock

Copy link
Copy Markdown
Member

This should probably be its own exchange that listens for cross-tab interactions and replays results imho

@m1212e m1212e closed this Jun 13, 2026
@m1212e

m1212e commented Jun 17, 2026

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants