quartic_sdk.graphql_client

Module Contents

Classes

GraphqlClient

Execute Query.

quartic_sdk.graphql_client.SCHEMA_REGEX
class quartic_sdk.graphql_client.GraphqlClient(url: str, username: str = None, password: str = None, token: str = None, timeout: Optional[Union[aiohttp.ClientTimeout, float]] = None, verify_ssl: bool = True)

Execute Query.

static version()

Return the SDK version

async _get_client(self)aiohttp.ClientSession

Get aiohttp client session object.

_get_graphql_url(self)str

Generates the graphql endpoint.

async __execute__query(self, query: str, variables: dict = None)

Execute query

execute_query(self, query: str, variables: dict = None)

Execute query with query param. :param query: Query that needs to be executed :param variables: Dictionary of variables that are used inside the query.

async execute_async_query(self, query: str, variables: dict = None)

Execute query asynchronously. :param query: Query that needs to be executed :param variables: Dictionary of variables that are used inside the query. :return:

static get_graphql_client_from_apihelper(api_helper: quartic_sdk.api.api_helper.APIHelper)

Returns an instance of GraphqlClient from provided api_helper instance. :param api_helper: APIHelper instace whose configurations will be used to initialte GraphqlClient :return: new GraphqlCleint instance initiated with existing APIHelper configuration.