Skip to content
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

Fix: GT query for SCALE_SOLUTION subtask type #20

Open
chrisdicaprio opened this issue Jul 13, 2022 · 0 comments
Open

Fix: GT query for SCALE_SOLUTION subtask type #20

chrisdicaprio opened this issue Jul 13, 2022 · 0 comments

Comments

@chrisdicaprio
Copy link
Collaborator

For general tasks that are subtask type: SCALE_SOLUTION the following query results in an error:

can be demonstrated using ID R2VuZXJhbFRhc2s6MTA1NTc0 in PROD

qry = '''
            query one_general ($id:ID!)  {
              node(id: $id) {
                __typename
                ... on GeneralTask {
                  id
                  title
                  description
                  created
                  swept_arguments
                  children {
                    #total_count
                    edges {
                      node {
                        child {
                          __typename
                          ... on Node {
                            id
                          }
                          ... on AutomationTaskInterface {
                            created
                            state
                            result
                            arguments {k v}
                          }
                        }
                      }
                    }
                  }
                }
              }
            }'''

        # print(qry)
        input_variables = dict(id=id)
        executed = self.run_query(qry, input_variables)
File ~/.virtualenvs/runzi/lib/python3.8/site-packages/nshm_toshi_client/toshi_client_base.py:69, in ToshiClientBase.run_query(self, query, variable_values)
     66 if self._with_schema_validation:
     67     self._client.validate(gql_query) #might throw graphql.error.base.GraphQLError
---> 69 response = self._client.execute(gql_query, variable_values)
     71 #logger.debug('response: %s', response)
     73 if response.get('errors') is None:

File ~/.virtualenvs/runzi/lib/python3.8/site-packages/gql/client.py:78, in Client.execute(self, document, *args, **kwargs)
     76 result = self._get_result(document, *args, **kwargs)
     77 if result.errors:
---> 78     raise Exception(str(result.errors[0]))
     80 return result.data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant