-
Notifications
You must be signed in to change notification settings - Fork 94
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
Refactor client/server & GraphQL workflow mutations #4529
base: master
Are you sure you want to change the base?
Conversation
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.
cylc/flow/network/schema.py
Outdated
@@ -206,7 +219,7 @@ def parse_node_id(item, node_type=None): | |||
|
|||
# Field args (i.e. for queries etc): | |||
class SortArgs(InputObjectType): | |||
keys = List(String, default_value=['id']) | |||
keys = graphene.List(String, default_value=['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 originally had it graphene.List(
but it was deemed unnecessary by reviewers.. I guess it can't be helped with typing
..
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.
Yes it's an unfortunate clash. But seeing as typing
is widely-used now I think it should take precedence
Sorry, should have mentioned: It's not working from the UI yet as some changes need to be made there. But it's working in GraphiQL. |
Not going to be finished by Christmas so bumping to 8.0rc2 |
Don't unnecessarily process graphql errors Tidy resolvers
These changes partially address cylc/cylc-uiserver#271
Sibling: cylc/cylc-uiserver#290
(content, error, user)
user
is included like this instead of adding it to the GraphQL{data: ..., errors: ...}
response (the spec does not permit adding extra keys)NamedTuple
calledResponseTuple
is used instead of a regular tuple for better clarity and type safetyGenericResponse
output which could be any object in practice, the output is now agraphene.List
ofGenericReponse
s, andGenericResponse
has 3 fields:workflowId = graphene.String()
,success = graphene.Boolean()
andmessage = graphene.String()
Requirements check-list
CONTRIBUTING.md
and added my name as a Code Contributor.setup.py
andconda-environment.yml
.Footnotes
The exception to this is that Protobuf results are sent back as-is in
bytes
format instead of the tuple, becausebytes
is not JSON-serializable ↩