-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Labels
type: featureA new featureA new feature
Description
well. this line need to be changed from
result = await resp.json()
to
result = await resp.json(content_type=None)
It was giving me errors while I am trying to get data using headers with API key
EXAMPLE CODE:
query = """query { lookup(placekey: "222-224@5vg-7gr-6kz") { placekey safegraph_core { location_name street_address city region postal_code iso_country_code } } }"""
async def async_main():
transport = AIOHTTPTransport(
url='https://api.safegraph.com/v1/graphql',
headers={'Content-Type': 'application/json', 'apikey': "__KEY__"}
)
__query__ = gql(query)
async with gql_Client(
transport=transport, fetch_schema_from_transport=True,
) as session:
result = await session.execute(__query__)
print(result)
return result
guys my library depends on gql mainly so, let me know what I can do. I need to make it work async, and this line need to be different I think. I will test it again with the latest patch too. https://pypi.org/project/safegraphQL
version: gql==3.0.0a1
Line 228 in af8f223
result = await resp.json() |
Metadata
Metadata
Assignees
Labels
type: featureA new featureA new feature