-
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
Expose deprecatedById in workflowRuns query interface #300
Conversation
params["deprecated_by"] = deprecated_by[0] | ||
del params["deprecated_by_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.
I removed these lines because this was causing some unexpected behavior (the actual change is in the codegen template, but this is easier to look at):
- I have two
workflowRuns
, one ending in6397d
(status ABORTED) and one ending ind80a8
(status CREATED) - In my update mutation, I'm trying to update
6397d
to be deprecated byd80a8
- But after running the mutation, it looks like the reverse has happened, even though the
updatedAt
timestamp was set on the correctworkflowRun
Removing these lines allows us to update the correct workflowRun
's deprecatedById
value as we expect (see the example in the PR description).
To be completely honest, I'm not sure why these lines were causing the incorrect workflowRun
to be updated. I tried stepping through the code and it looked like all the correct objects were being fetched/updated with the right params, so I'm not sure why updating the id
instead of the actual related object fixes it.
My best guess is that something funky is going on with the underlying logic because deprecatedBy
causes workflowRun
to have a 1:1 relationship with itself. Let me know if there are concerns with this change or if there are any other solutions to fix this!
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.
LGTM
Updates codegen to expose ids of related objects from the same table in the query interface, i.e.:
taxa
, allow users to query fortaxClassId
,taxFamilyId
, etc.workflowRuns
, allow users to query fordeprecatedById
Manually tested:
workflowRun
to bedeprecatedBy
anotherdeprecatedById
is set as expected, and we can query for it