refactor(website): Split fetching of backend and lapis sequence details in findOrganismAndData#6724
Draft
tombch wants to merge 5 commits into
Draft
refactor(website): Split fetching of backend and lapis sequence details in findOrganismAndData#6724tombch wants to merge 5 commits into
findOrganismAndData#6724tombch wants to merge 5 commits into
Conversation
…ly, with single request for data use terms history and sequence citations
findOrganismAndDatafindOrganismAndData
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
findOrganismAndDatafunction is used in the website to retrieve sequence details when viewing sequences both in the search UI and on an individual sequence details page for an accession. Previously, this function calledgetSequenceDetailsTableDatafor each organism, which would query LAPIS (for sequence details) and the backend (for data use terms history). The backend calls were duplicated across organisms when only a single call needs to be made.findOrganismAndDataandgetSequenceDetailsTableDatato keep the fan-out approach for LAPIS queries, but have a single call to all required backend endpoints. It does this by splitting the LAPIS and backend data fetching into separategetLapisSequenceDetailsandgetBackendSequenceDetailsfunctions.getBackendSequenceDetailsnow called once rather than per-organism, we add the sequence citation fetching to thegetBackendSequenceDetails, to remove some duplicated code.Screenshot
PR Checklist
🚀 Preview: Add
previewlabel to enable