-
Notifications
You must be signed in to change notification settings - Fork 0
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
OR Multiple _typeFilters #54
Conversation
Coverage report
Show files with reduced coverage 🔻
Test suite run success96 tests passing in 8 suites. Report generated by 🧪jest coverage report action from 9bbd0e0 |
src/util/exportToNDJson.js
Outdated
@@ -78,7 +78,7 @@ const exportToNDJson = async jobOptions => { | |||
const valueSetQueries = {}; | |||
if (typeFilter) { | |||
// subqueries may be joined together with a comma for a logical "or" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// subqueries may be joined together with a comma for a logical "or" | |
// subqueries may be joined together with a comma or as an array for a logical "or" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or however you think it would be appropriate to update this comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great updates! Added one very small recommendation for a comment update.
Summary
This PR ensures that our implementation of the
_typeFilter
$export Query Parameter aligns with the Bulk Data Access IG. Two or more_typeFilter
Query Parameters are OR'd together when provided in an export request.New behavior
Code changes
src/service/export.service.js
- checks if_typeFilter
is already an arraysrc/util/exportToNDJson.js
- checks if_typeFilter
is already an array, added a TODO comment for addressing ANDs within a_typeFilter
query (we have a separate backlog task for this)test/util/exportToNDJson.test.js
- added unit test for_typeFilter
arrayTesting guidance
npm run db:reset
npm run upload-bundles
npm start
_typeFilter
queries in Insomnia and make sure they work as expected! Example request collection for Insomnia is attached.typeFilterUpdate.json