Refractored headers parameter and renamed URL to url in exec_graphql
parent
ff54061234
commit
7e54b1e1a6
|
@ -78,8 +78,10 @@ def dump_schema(url, method, graphversion, headers):
|
|||
print("")
|
||||
|
||||
|
||||
def exec_graphql(URL, method, query, headers={}, only_length=0):
|
||||
r = requester(URL, method, query, headers)
|
||||
def exec_graphql(url, method, query, headers=None, only_length=0):
|
||||
if headers is None:
|
||||
headers = {}
|
||||
r = requester(url, method, query, headers)
|
||||
try:
|
||||
graphql = r.json()
|
||||
errors = graphql.get("errors")
|
||||
|
|
Loading…
Reference in New Issue