CMR-10186: Handling case when collections query parameter is a comma separated string #357
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CMR-STAC was passing the collections query parameter as is to graphQL which resulting in a comma separated string as an entryID, ie: "entryId": [ "HLSS30_2.0,HLSL30_2.0" ]. In this case CMR-STAC would return nothing.
This needs to be split properly so that the field passed the graphQL would be of the form "entryId": [ "HLSS30_2.0", "HLSL30_2.0" ]
Example GET Requests:
https://cmr.earthdata.nasa.gov/stac/LPCLOUD/search?collections=HLSS30_2.0,HLSL30_2.0
http://localhost:3000/stac/LPCLOUD/search?collections=HLSS30_2.0,HLSL30_2.0
Specifying multiple collections in this manner should return the proper results