Optimize DataSync updateRecord to not return full record#2502
Open
mpscholten wants to merge 1 commit intomasterfrom
Open
Optimize DataSync updateRecord to not return full record#2502mpscholten wants to merge 1 commit intomasterfrom
mpscholten wants to merge 1 commit intomasterfrom
Conversation
The server no longer fetches and sends the full record back after an
UPDATE. Instead it returns only the id (to confirm the row was found
and RLS allowed it). The JS client returns { id, ...patch } locally.
This is safe because the client already applies the patch optimistically
and receives any server-side changes (e.g. triggers) via the existing
DidUpdate subscription notifications.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
idto confirm the row was found and RLS allowed itrecord/recordsfields fromDidUpdateRecord/DidUpdateRecordsresponse typesupdateRecord()now returns{ id, ...patch }locally instead of the server responseDidUpdatesubscription notificationsTest plan
DidUpdatenotifications still deliver server-side trigger changesBreaking change: Code that uses the return value of
updateRecord()expecting the full server record will now only get{ id, ...patch }. Callers that need the full record should merge the patch into their local copy instead.🤖 Generated with Claude Code