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

GQL-89: Honor the linkTypes param when it is nested within GranulesInput params #140

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

macrouch
Copy link
Contributor

@macrouch macrouch commented Nov 5, 2024

Overview

What is the feature?

The query EDSC uses to retrieve granule download links is not taking into account the linkTypes param that is being provided because it is nested within the params object.

What is the Solution?

Used the mergeParams util to ensure we see the linkTypes param regardless of where it is supplied.

What areas of the application does this impact?

Granule queries with the linkTypes param

Testing

Query

query GetGranuleLinks($params: GranulesInput) {
  granules(params: $params) {
    cursor
    items {
      links
    }
  }
} 

Variables

{
  "params": {
    "exclude": {},
    "options": {},
    "conceptId": [],
    "twoDCoordinateSystem": {},
    "limit": 50,
    "linkTypes": [
      "data",
      "s3",
      "browse"
    ],
    "collectionConceptId": "C2276336440-LARC_ASDC"
  }
} 

Ensure that only the correct link types are returned (data, s3 and browse)

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5ee0fb5) to head (bbf586b).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #140   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          106       106           
  Lines         2410      2410           
  Branches       273       273           
=========================================
  Hits          2410      2410           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@macrouch macrouch merged commit e9bcdc0 into main Nov 5, 2024
8 checks passed
@macrouch macrouch deleted the GQL-89 branch November 5, 2024 15:48
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.

3 participants