GQL-85: Cannot view collection metadata C1000000321-SEDAC in MMT "All Collections" #141
+55
−2
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?
Can't view some collections when umm on revisions isn't available.
What is the Solution?
umm isn't available when a revision has been deleted as the only thing returned in these cases is the 'tombstone' which contains just the metadata. Collection.js in concepts is different from variable, tool, and service in that the component has a function called normalizeUmmItem which needs umm in order to function. A change within this function is needed to get the code to work as expected. Adding tombstoneMetadata is not actually required to get the code to work but may be needed to inform other clients that the data that is being returned is not, in fact, a collection.
Adjusted the normalizeUmmItem function in collection.js to account for this. Adjusted the .graphql's so that they were passing 'deleted' metadata up to client.
What areas of the application does this impact?
concept.graphql and collection.js concept
Testing
Reproduction steps
Attachments
Collection on GQL-85
Collection on Main
You CAN run graphQL in Prod mode to see the problem Collection in action but I've included a screenshot here so you don't have to:
Checklist