-
Notifications
You must be signed in to change notification settings - Fork 2
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: Drop adminClient
(2/2)
#2375
Conversation
Removed vultr server and associated DNS entries |
@@ -136,14 +146,18 @@ const findAndReplaceInFlow = async ( | |||
} | |||
|
|||
// if matches, proceed with mutation to update flow data | |||
const response = await adminClient.request( | |||
const { client: $client } = getClient(); |
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.
Not massively fond of this syntax but it's somewhat of a solution to this issue - #2297 (comment)
interface PublishedFlows { | ||
flow: { | ||
publishedFlows: { | ||
// TODO: use FlowGraph from planx-core here |
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.
This TODO
is intentionally left here - making this change has pretty messy cascading effects that would add a lot of noise to this PR.
I'll make a GitHub issue describing the required change here.
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.
Issue logged here - #2405
); | ||
|
||
return data.flows_by_pk.published_flows?.[0]?.data; | ||
const mostRecent = flow?.publishedFlows?.[0]?.data; | ||
if (!mostRecent) throw Error(`Published flow not found for flow ${id}`); |
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.
Generally we do error catching outside these little request functions but making it once here actually is much cleaner.
Going forward to would be nice to handle this in a much more standardised method - I actually think Apollo has some really nice patterns for this which may be something to consider.
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.
Appreciate being able to work through all changes in two separate chunks, thanks!
d3fbb29
to
60803c6
Compare
Thanks for catching these naming issues! |
What does this PR do?
adminClient
(1/2) #2356 - please see this PR for contextadminClient
from API codebaseHASURA_GRAPHQL_ADMIN_SECRET
from the API codebase, as this is still required for the Hasura Metadata and Schema APIs