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-91: Added "standardProduct" to schema #142

Merged
merged 7 commits into from
Nov 13, 2024
Merged

Conversation

bnp26
Copy link
Contributor

@bnp26 bnp26 commented Nov 8, 2024

Overview

What is the feature?

Allow "standardProduct" to be used in query params for collections queries.

What is the Solution?

Added "standardProduct" to the collections schema.

What areas of the application does this impact?

src/cmr/concepts/collection.js
src/types/collection.graphql

Testing

Reproduction steps

  • Environment for testing: PROD
  • Collection to test with: N/A
  1. Pick the Standard Products portal
  2. Click on the export collections button and then the CSV.
  3. Ensure the collection list downloads properly.
  4. Then Click on the export collections button again and then JSON.
  5. Ensure the collection list downloads properly.

Graphql Testing
Ensure that querying with standardProduct as a query parameter does not return errors

QUERY:

query ExportCollections($params: CollectionsInput) {
  collections(params: $params) {
    cursor
    count
    items {
      provider
      shortName
      version
      title
      standardProduct
      processingLevel
      platforms
      timeStart
      timeEnd
    }
  }
}

PARAMS:

{
  "params": {
    "includeHasGranules": true,
    "limit": 10,
    "standardProduct": true
  }
}

Attachments

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

Checklist

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

Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8f7da17) to head (5392b14).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #142   +/-   ##
=========================================
  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.

@eudoroolivares2016
Copy link
Contributor

Remember to update the commits and name of this PR to GQL-91 instead of EDSC-4306

@macrouch
Copy link
Contributor

Please complete the PR template as well. Testing steps are very useful for reviewers trying to switch contexts to review your changes

@bnp26 bnp26 changed the title EDSC-4306: Added "standardProduct" to schema GQL-91: Added "standardProduct" to schema Nov 11, 2024
Copy link
Contributor

@macrouch macrouch left a comment

Choose a reason for hiding this comment

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

This isn't working for me. Regardless of the value I pass in to the standardProduct parameter I get the same results back.

@bnp26
Copy link
Contributor Author

bnp26 commented Nov 12, 2024

This isn't working for me. Regardless of the value I pass in to the standardProduct parameter I get the same results back.

Would not getting different/the same result back be in scope? I thought we just need to make sure the value was able to be accepted by graphql. This would be a cmr ticket if the results don't work right?

@macrouch
Copy link
Contributor

This isn't working for me. Regardless of the value I pass in to the standardProduct parameter I get the same results back.

Would not getting different/the same result back be in scope? I thought we just need to make sure the value was able to be accepted by graphql. This would be a cmr ticket if the results don't work right?

First step is to verify that the parameter is being sent to CMR. Results coming back the same regardless of the parameter value would indicate it isn't

@macrouch macrouch merged commit c3cf318 into nasa:main Nov 13, 2024
7 of 8 checks passed
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