Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LiveQuery handle unset operation #714

Merged
merged 3 commits into from
Jan 6, 2019

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jan 4, 2019

@flovilmart
Copy link
Contributor

Thé op should be sent to the client as undefined is not serialized.

@codecov
Copy link

codecov bot commented Jan 4, 2019

Codecov Report

Merging #714 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #714      +/-   ##
==========================================
+ Coverage   88.58%   88.59%   +<.01%     
==========================================
  Files          53       53              
  Lines        4538     4541       +3     
  Branches     1053     1054       +1     
==========================================
+ Hits         4020     4023       +3     
  Misses        518      518
Impacted Files Coverage Δ
src/LiveQueryClient.js 87.5% <100%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 315a98f...6ec4703. Read the comment docs.

@dplewis
Copy link
Member Author

dplewis commented Jan 4, 2019

Thats a better solution. Instead of setting undefined like in this PR. Send undefined to the client

@dplewis dplewis closed this Jan 4, 2019
@dplewis dplewis deleted the lq-unset-pointer branch January 4, 2019 22:40
@dplewis dplewis restored the lq-unset-pointer branch January 4, 2019 23:55
@dplewis dplewis reopened this Jan 4, 2019
@dplewis
Copy link
Member Author

dplewis commented Jan 5, 2019

@flovilmart I found it easier since I have the original object to compare to the new object and set the unset fields to undefined. No change needed on the server side

A few questions I have about live query. On update / event subscription since its the latest version of an object should it override server data? Should it update LDS if enabled?

@dplewis dplewis requested a review from flovilmart January 5, 2019 18:52
@@ -264,7 +264,7 @@ describe('LiveQueryClient', () => {
expect(isChecked).toBe(true);
});

it('can handle WebSocket response unset pointer', async () => {
fit('can handle WebSocket response unset field', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

@dplewis dplewis merged commit 15ece68 into parse-community:master Jan 6, 2019
@dplewis dplewis deleted the lq-unset-pointer branch January 6, 2019 02:43
@dplewis
Copy link
Member Author

dplewis commented Jan 6, 2019

@flovilmart Thanks! Did you see my last comment?

@flovilmart
Copy link
Contributor

It should likely update yes,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants