def METHOD_NAME(self, query):
    try:
        r = requests.post(
            self.subgraph_url,
            json={"query": query},
        )
        if r.ok:
            json_data = r.json()
            return json_data["data"]
        else:
            raise (r.raise_for_status())
    except requests.exceptions.ConnectionError:
        logging.warn("Connection error during query subgraph")
    except Exception as e:
        logging.warn("Error when querying subgraph")
        raise (e)