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("")
|
print("")
|
||||||
|
|
||||||
|
|
||||||
def exec_graphql(URL, method, query, headers={}, only_length=0):
|
def exec_graphql(url, method, query, headers=None, only_length=0):
|
||||||
r = requester(URL, method, query, headers)
|
if headers is None:
|
||||||
|
headers = {}
|
||||||
|
r = requester(url, method, query, headers)
|
||||||
try:
|
try:
|
||||||
graphql = r.json()
|
graphql = r.json()
|
||||||
errors = graphql.get("errors")
|
errors = graphql.get("errors")
|
||||||
|
|
Loading…
Reference in New Issue