Skip to content

Split BackendConnector trait - #46

Draft
simolus3 wants to merge 2 commits into
mainfrom
connector-split
Draft

simolus3 wants to merge 2 commits into
mainfrom
connector-split

Conversation

@simolus3

@simolus3 simolus3 commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator

This implements the backend connector split proposal. Because this SDK is in early beta, I have removed the old BackendConnector trait as a breaking change instead of keeping both around. This simplifies internal code a bit.

BackendConnector is now split into Authenticator (returning a JWT) and MutationUploader (uploading local writes). SyncOptions::new takes both, SyncOptions::{upload,download}_only takes just one and drives unidirectional sync. For downloads, the endpoint is now static and set on SyncOptions instead of being returned as a PowerSyncToken.

Known issue: If there's pending local data while we're connected in download-only mode, downloaded data wouldn't get applied. The core extension will expose this state, allowing SDKs to raise an error for this.

AI use: Tests ported from the Kotlin SDK with Claude, also reviewed with Claude.

@simolus3 simolus3 added the Product visibility PRs relevant for the product team label Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Product visibility PRs relevant for the product team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant