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

Single object queries to use include and keys #1280

Merged
merged 4 commits into from
Apr 1, 2016

Conversation

jeremyjackson89
Copy link
Contributor

Allow queries on specific objects to use the include and keys query parameters.

@codecov-io
Copy link

Current coverage is 93.00%

Merging #1280 into master will decrease coverage by -0.06% as of b86c5bd

@@            master   #1280   diff @@
======================================
  Files           84      84       
  Stmts         5305    5315    +10
  Branches       971     974     +3
  Methods          0       0       
======================================
+ Hit           4937    4943     +6
  Partial         11      11       
- Missed         357     361     +4

Review entire Coverage Diff as of b86c5bd

Powered by Codecov. Updated on successful CI builds.

@drew-gross
Copy link
Contributor

This code looks good, but would you mind added a test case for it? In spec/ParseQuery.spec.js

@jeremyjackson89
Copy link
Contributor Author

Yeah, I will ASAP.

@jeremyjackson89
Copy link
Contributor Author

Added the test cases.

return rest.find(req.config, req.auth, req.params.className, {objectId: req.params.objectId})
let body = Object.assign(req.body, ClassesRouter.JSONFromQuery(req.query));
let options = {};
let allowConstraints = ['keys', 'include'];
Copy link
Contributor

Choose a reason for hiding this comment

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

can we move that up as a const ALLOWED_GET_QUERY_KEYS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@facebook-github-bot
Copy link

@jeremyjackson89 updated the pull request.

@facebook-github-bot
Copy link

@jeremyjackson89 updated the pull request.

@drew-gross drew-gross merged commit c346e15 into parse-community:master Apr 1, 2016
@kobyhastings
Copy link

@drew-gross @flovilmart when will this be released to the npm package? Thanks

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.

6 participants