Skip to content

Commit

Permalink
add passing options(Ex: timeout, verify_ssl, ...aiohttp parameters) t…
Browse files Browse the repository at this point in the history
…o execute_async method
  • Loading branch information
Tom1204 committed Jan 26, 2024
1 parent a3371e0 commit f78daba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python_graphql_client/graphql_client.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Module containing graphQL client."""

import json
import logging
from typing import Any, Callable
Expand Down Expand Up @@ -60,6 +61,7 @@ async def execute_async(
variables: dict = None,
operation_name: str = None,
headers: dict = {},
**kwargs: Any,
):
"""Make asynchronous request to graphQL server."""
request_body = self.__request_body(
Expand All @@ -71,6 +73,7 @@ async def execute_async(
self.endpoint,
json=request_body,
headers={**self.headers, **headers},
**{**self.options, **kwargs},
) as response:
return await response.json()

Expand Down

0 comments on commit f78daba

Please sign in to comment.