def graphql(self, query: Any, raise_on_error: bool=True, headers: Dict[(str, str)]=None, variables: Dict[(str, JSONLike)]=None, token: str=None, retry_on_api_error: bool=True) -> GraphQLResult:
    '\n        Convenience function for running queries against the Prefect GraphQL API\n\n        Args:\n            - query (Any): A representation of a graphql query to be executed. It will be\n                parsed by prefect.utilities.graphql.parse_graphql().\n            - raise_on_error (bool): if True, a `ClientError` will be raised if the GraphQL\n                returns any `errors`.\n            - headers (dict): any additional headers that should be passed as part of the\n                request\n            - variables (dict): Variables to be filled into a query with the key being\n                equivalent to the variables that are accepted by the query\n            - token (str): an auth token. If not supplied, the `client.access_token` is used.\n            - retry_on_api_error (bool): whether the operation should be retried if the API returns\n                an API_ERROR code\n\n        Returns:\n            - dict: Data returned from the GraphQL query\n\n        Raises:\n            - ClientError if there are errors raised by the GraphQL mutation\n        '
    result = self.post(path='', server=self.api_server, headers=headers, params=dict(query=parse_graphql(query), variables=json.dumps(variables)), token=token, retry_on_api_error=retry_on_api_error)
    if (raise_on_error and ('errors' in result)):
        if ('UNAUTHENTICATED' in str(result['errors'])):
            raise AuthorizationError(result['errors'])
        elif ('Malformed Authorization header' in str(result['errors'])):
            raise AuthorizationError(result['errors'])
        elif (result['errors'][0].get('extensions', {}).get('code') == 'VERSION_LOCKING_ERROR'):
            raise VersionLockError(result['errors'])
        raise ClientError(result['errors'])
    else:
        return GraphQLResult(result)
Convenience function for running queries against the Prefect GraphQL API

Args:
    - query (Any): A representation of a graphql query to be executed. It will be
        parsed by prefect.utilities.graphql.parse_graphql().
    - raise_on_error (bool): if True, a `ClientError` will be raised if the GraphQL
        returns any `errors`.
    - headers (dict): any additional headers that should be passed as part of the
        request
    - variables (dict): Variables to be filled into a query with the key being
        equivalent to the variables that are accepted by the query
    - token (str): an auth token. If not supplied, the `client.access_token` is used.
    - retry_on_api_error (bool): whether the operation should be retried if the API returns
        an API_ERROR code

Returns:
    - dict: Data returned from the GraphQL query

Raises:
    - ClientError if there are errors raised by the GraphQL mutation
def graphql(self, query: Any, raise_on_error: bool=True, headers: Dict[(str, str)]=None, variables: Dict[(str, JSONLike)]=None, token: str=None, retry_on_api_error: bool=True) -> GraphQLResult:
    '\n        Convenience function for running queries against the Prefect GraphQL API\n\n        Args:\n            - query (Any): A representation of a graphql query to be executed. It will be\n                parsed by prefect.utilities.graphql.parse_graphql().\n            - raise_on_error (bool): if True, a `ClientError` will be raised if the GraphQL\n                returns any `errors`.\n            - headers (dict): any additional headers that should be passed as part of the\n                request\n            - variables (dict): Variables to be filled into a query with the key being\n                equivalent to the variables that are accepted by the query\n            - token (str): an auth token. If not supplied, the `client.access_token` is used.\n            - retry_on_api_error (bool): whether the operation should be retried if the API returns\n                an API_ERROR code\n\n        Returns:\n            - dict: Data returned from the GraphQL query\n\n        Raises:\n            - ClientError if there are errors raised by the GraphQL mutation\n        '
    result = self.post(path=, server=self.api_server, headers=headers, params=dict(query=parse_graphql(query), variables=json.dumps(variables)), token=token, retry_on_api_error=retry_on_api_error)
    if (raise_on_error and ('errors' in result)):
        if ('UNAUTHENTICATED' in str(result['errors'])):
            raise AuthorizationError(result['errors'])
        elif ('Malformed Authorization header' in str(result['errors'])):
            raise AuthorizationError(result['errors'])
        elif (result['errors'][0].get('extensions', {}).get('code') == 'VERSION_LOCKING_ERROR'):
            raise VersionLockError(result['errors'])
        raise ClientError(result['errors'])
    else:
        return GraphQLResult(result)