GQL-118: Query for a concept by a specific revision-id #177
+601
−8
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.
Overview
What is the feature?
This feature adds support for fetching specific revisions of collections in the GraphQL API. It allows querying a particular revision of a collection by its concept ID and revision ID.
What is the Solution?
The solution involves modifying the Collection concept class and related resolvers to handle revision-specific queries. Key changes include:
What areas of the application does this impact?
This change impacts several areas of the application:
src/cmr/concepts/concept.js: Major updates to the Concept class to support revision-specific queries.src/resolvers/collection.js: Updates to collection resolvers to handle revision-specific queries and add appropriate error checks.src/types/collection.graphql: Addition of revisionId to the CollectionInput type.src/resolvers/__tests__/collection.test.js: New tests added to cover the new functionality and error cases.Testing
Reproduction steps
Checklist