Skip to content

Add original object to LiveQuery Events #5265

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

Merged
merged 2 commits into from
Dec 28, 2018

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Dec 28, 2018

Closes: #5233

No breaking changes, update will be needed on the JS SDK.

will be used for update and event subscriptions

@codecov
Copy link

codecov bot commented Dec 28, 2018

Codecov Report

Merging #5265 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5265      +/-   ##
==========================================
+ Coverage   93.87%   93.91%   +0.04%     
==========================================
  Files         123      123              
  Lines        8973     8975       +2     
==========================================
+ Hits         8423     8429       +6     
+ Misses        550      546       -4
Impacted Files Coverage Δ
src/LiveQuery/Client.js 100% <100%> (+2.56%) ⬆️
src/LiveQuery/ParseLiveQueryServer.js 87.57% <100%> (ø) ⬆️
src/RestWrite.js 93.06% <0%> (ø) ⬆️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 92.21% <0%> (+0.72%) ⬆️

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 de92ce5...fde09d1. Read the comment docs.

@dplewis dplewis requested a review from flovilmart December 28, 2018 21:48
@@ -92,6 +96,12 @@ class Client {
fields = this.subscriptionInfos.get(subscriptionId).fields;
}
response['object'] = this._toJSONWithFields(parseObjectJSON, fields);
if (typeof parseOriginalObjectJSON !== 'undefined') {
response['originalParseObject'] = this._toJSONWithFields(
Copy link
Contributor

Choose a reason for hiding this comment

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

We use ‘original’ in the before/after hooks. Can you have a look? Would be nice to preserve semantics

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@flovilmart
Copy link
Contributor

Thx!

@flovilmart flovilmart merged commit ce7ff2c into parse-community:master Dec 28, 2018
@dplewis dplewis deleted the livequery-update-original branch December 28, 2018 22:57
UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* Add original object to LiveQuery Events

* change response original
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