Even if errors occured, the server may return data. Store that
data in GraphQLError.data so that callers can easily access it.
---
srht/graphql/client.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/srht/graphql/client.py b/srht/graphql/client.py
index 01176c30ae7e..a7dac0745f5a 100644
--- a/srht/graphql/client.py+++ b/srht/graphql/client.py
@@ -11,6 +11,7 @@ class GraphQLError(Exception):
def __init__(self, body):
self.body = body
self.errors = body["errors"]
+ self.data = body.get("data")def exec_gql(site, query, user=None, client_id=None, valid=None, **variables):
op = GraphQLOperation(query)
--
2.39.2