Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sw-utils"
version = "v0.12.7"
version = "v0.12.8"
description = "StakeWise Python utils"
authors = ["StakeWise Labs <info@stakewise.io>"]
license = "GPL-3.0-or-later"
Expand Down
7 changes: 5 additions & 2 deletions sw_utils/graph/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,22 @@


class GraphClient:
# pylint: disable=too-many-arguments,too-many-positional-arguments
def __init__(
self,
endpoint: str,
request_timeout: int = 10,
retry_timeout: int = 60,
page_size: int = 100,
ssl: bool = True,
) -> None:
self.endpoint = endpoint
self.request_timeout = request_timeout
self.retry_timeout = retry_timeout
self.page_size = page_size

transport = AIOHTTPTransport(url=endpoint, timeout=self.request_timeout)
# ssl parameter is added to disable AIOHTTPTransport warning
# will remove it for 4.x gql version
transport = AIOHTTPTransport(url=endpoint, timeout=self.request_timeout, ssl=ssl)
self.gql_client = Client(transport=transport)
self.session: AsyncClientSession | None = None

Expand Down