fix: KeyError: 'data'
In some cases it is not possible to download the schema, in this case I added a condition to not return an error.pull/40/head
parent
98997bd7cf
commit
2a559778e5
|
@ -36,6 +36,11 @@ def dump_schema(url, method, graphversion, headers, use_json, proxy):
|
||||||
|
|
||||||
line = 0
|
line = 0
|
||||||
|
|
||||||
|
if 'data' not in schema:
|
||||||
|
print('[+] Unable to download schema.')
|
||||||
|
|
||||||
|
exit()
|
||||||
|
|
||||||
for line, types in enumerate(schema['data']['__schema']['types']):
|
for line, types in enumerate(schema['data']['__schema']['types']):
|
||||||
|
|
||||||
if types['kind'] == "OBJECT":
|
if types['kind'] == "OBJECT":
|
||||||
|
|
Loading…
Reference in New Issue