feat: Add LiveQuery query operation#10470
Conversation
|
I will reformat the title to use the proper commit message syntax. |
|
🚀 Thanks for opening this pull request! We appreciate your effort in improving the project. Please let us know once your pull request is ready for review. Tip
Note Please respond to review comments from AI agents just like you would to comments from a human reviewer. Let the reviewer resolve their own comments, unless they have reviewed and accepted your commit, or agreed with your explanation for why the feedback was incorrect. Caution Pull requests must be written using an AI agent with human supervision. Pull requests written entirely by a human will likely be rejected, because of lower code quality, higher review effort and the higher risk of introducing bugs. Please note that AI review comments on this pull request alone do not satisfy this requirement. Our CI and AI review are safeguards, not development tools. If many issues are flagged, rethink your development approach. Invest more effort in planning and design rather than using review cycles to fix low-quality code. |
📝 WalkthroughWalkthroughThis PR adds a websocket ChangesLive Query Query Operation
Sequence DiagramsequenceDiagram
participant Client as WebSocket Client
participant Server as ParseLiveQueryServer
participant DB as Parse.Query
participant Response as Client.pushResult
Client->>Server: {"op":"query","requestId":123}
Server->>Server: Validate clientId exists
Server->>Server: Lookup subscription by requestId
Server->>DB: new Parse.Query(className)
DB->>DB: Apply where clause
DB->>DB: Apply field selection (keys)
Server->>DB: find(sessionToken or useMasterKey)
DB-->>Server: results array
Server->>Response: pushResult(subscriptionId, results)
Response->>Response: Map results via _toJSONWithFields
Response-->>Client: {"op":"result","requestId":123,"results":[...]}
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
This is ready for review. This PR resumes #9864. It keeps the server change focused. The JS SDK side appears released in parse-community/Parse-SDK-JS#2114. Local checks passed. See the PR body for the commands. |
Issue
Closes #9086 and resumes #9864.
Approach
This adds one socket request for saved live query rows.
The server uses saved auth and selected fields.
Missing client or query data returns a clear error.
Tasks
Schema, server path, result messages, and tests are done.
Checks
Specs, lint, and build passed.
/claim #9086