I was unable to subscribe to record changes using the live method. After researching, I found the following:
Live query ID is verified by z.string().uuid().
In actuality, it is decoded as the UUID class, not a string.
What does this change do?
Make live queries work.
Changing the string type to UUID prevents users from using it incorrectly.
What is your testing strategy?
Add three tests to tests/integration/tests/live.ts:
The test suite "live" checks that the live method returns a UUID class on the WebSocket engine and verifies that live queries work. Also, checks that it fails on the HTTP engine.
The test suite "unsubscribe live" checks whether a subscribed live query can be unsubscribed using the UUID class returned by the live method. As far as the HTTP engine is concerned, it doesn't support this, so we don't test anything.
The test suite "kill" checks whether a subscribed live query can be canceled using the UUID class returned by the live method. As far as the HTTP engine is concerned, it doesn't support this, so we don't test anything.
Thank you for the great work on this project.
What is the motivation?
I was unable to subscribe to record changes using the live method. After researching, I found the following:
z.string().uuid()
.What does this change do?
What is your testing strategy?
Add three tests to
tests/integration/tests/live.ts
:live
method returns a UUID class on the WebSocket engine and verifies that live queries work. Also, checks that it fails on the HTTP engine.live
method. As far as the HTTP engine is concerned, it doesn't support this, so we don't test anything.live
method. As far as the HTTP engine is concerned, it doesn't support this, so we don't test anything.Is this related to any issues?
N/A
Have you read the Contributing Guidelines?