-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: Create Connection between Fed Server and Next Gen #137
Conversation
routing based on feature flags
header
Co-authored-by: Jake Heath <76011913+jakeyheath@users.noreply.github.com>
…ion-server into CZID-8731
…deration-server into CZID-8731
Co-authored-by: Saquib Kothawala <saquib.kothawala@contractor.chanzuckerberg.com> Co-authored-by: Jerry Fu <2072627+jfoo1984@users.noreply.github.com> Co-authored-by: Jake Heath <76011913+jakeyheath@users.noreply.github.com> Co-authored-by: czi-github-helper[bot] <95879977+czi-github-helper[bot]@users.noreply.github.com> Co-authored-by: rzlim08 <37033997+rzlim08@users.noreply.github.com> Co-authored-by: bchu1 <151689101+bchu1@users.noreply.github.com> Co-authored-by: Suzette McCanny <smccanny@deloitte.ca> Co-authored-by: Erin Hoops <109251328+ehoops-cz@users.noreply.github.com>
|
||
const checkForLogin = (responseUrl: string | null) => { | ||
if (responseUrl?.includes("/auth0/refresh_token?mode=login")) { | ||
throw new Error("You must be logged in to perform this action."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my experience, in mesh
, if you throw an error and it isn't caught, it will kill the mesh process this code was running in (although it automatically attempts to restart it). Looking above, I believe this error should be caught and we reject the Promise, right? Just wanted to verify so we don't kill the server processes 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mmm yeah, this function has been there for a while but now that the functions are modular maybe I need try catch statements in the fetchFromNextGen and the getFromRails incase they are called on their own
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting all this together in a state where we can merge it!
Pull Request
JIRA Ticket
CZID-8731
Description
This PR pulls in the connection code to main so that we are all synced up between sandbox and main.
This will allow us to work together on creating connections for individual resolvers.
There are a lot of formatting changes in this PR unfortunately but the main work is done in
httpUtils
. I changed theget
function to receive an object and pulled outgetFromRails
andfetchFromNextGen
into their own functions so that we can call them directly in the resolvers if needed.We can either call
fetchFromNextGen
using the passed throughcontext.params.query
with a formatting function that pulls out the 'fed' prefix and theinput: {}
wrapper or we can pass an optional custom query if we need something specific in the resolvers.Tests
Updated unit tests to cover new fedConsensusGenome functionality
Smoke tested with main branch of
czid-web
to ensure no changes in functionality