Repository navigation
Conversation
…d link to new ref
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
| transactionId?: number; // Groups ops from same transaction | ||
| metadata?: string; // Custom metadata (trackMetadata) | ||
| trackPrevious?: Record<string, any>; // Previous values (trackPrevious) | ||
| previousValues?: Record<string, any>; // Previous values (trackPreviousValues) |
There was a problem hiding this comment.
The option that populates previousValues is called trackPrevious in the JS/web SDK (not trackPreviousValues, which is the name used in the other SDKs). Since this page's examples are JS-only, the comment should read (trackPrevious) to match what a reader would actually set on their Table definition.
| previousValues?: Record<string, any>; // Previous values (trackPreviousValues) | |
| previousValues?: Record<string, any>; // Previous values (trackPrevious) |
| Electric is read-path only, so this guide doesn't cover migrating a write path. However, it's highly recommended to use the PowerSync upload queue to ensure consistency instead of sending mutations directly to your backend. You might notice data flicker on the client if you write directly to your backend APIs and bypass the PowerSync upload queue. | ||
|
|
||
| Follow [this guide](/configuration/app-backend/client-side-integration) for integrating the PowerSync upload queue with your backend APIs. | ||
| To upload the queue through the backend API you already have, see [Use Your Existing API](/handling-writes/write-path/existing-api). |
There was a problem hiding this comment.
"Upload the queue through the backend API" is awkward: you don't upload a queue itself, you upload the mutations it holds. Consider rewording, e.g. "To upload queued changes through the backend API you already have, see Use Your Existing API."
Stacked on #730. This PR gives each page that touches the write path one job, so new users follow one path from setup to a working write API instead of jumping between pages that repeat each other.
Reference: https://journeyapps.slack.com/archives/C0BA0HHLBQ9/p1793358584508909?thread_ts=1793189532.594099&cid=C0BA0HHLBQ9
Important (contentious?) decisions:
How the Pages Fit Together
Onboarding path
Integration and migration guides (Supabase, Neon, Atlas Device Sync, Electric) link straight to the route guide that fits them.
Detail pages, one job each
Write Path Overview: the mental model, enough to implement. It ends with "Choose Where to Start".
Write Path Concepts: the rules every write API follows: operations, authentication, applying writes before responding, failures and rollback. It opens with a short orientation, so it also works as an entry point.
Client-Side Integration: what the SDK does: when it calls
fetchCredentials()anduploadData(), throttling, retries, and stalled-queue detection.App Backend Setup: the two jobs your backend does for PowerSync: It also lists the kinds of backend you can use: your existing backend, the reference write implementation, a custom backend, Supabase or Neon, serverless functions, or a data API service.
Everything else (Writing Data, Usage Examples, Consistency, the conflict and checkpoint pages) covers its own topic and links to Concepts instead of explaining the flow again.
Changes
PUTcontains.Not in this PR: the "writes → mutations" terminology pass
AI disclosure: I used Claude Code (Opus 5.5) to find issues in the current flow and content and come up with a better structure and fix inaccuracies. Claude Code made all changes and also drafted this description, I guided, reviewed and tweaked each change on a high level. Codex (6.1 Sol Extra High) reviewed this PR for accuracy.