# Path: ramjet/utils/db.py
# def get_conn():
#     return pymongo.MongoClient(
#         f"mongodb://{MONGO_USER}:{MONGO_PASSWD}@{MONGO_HOST}:{MONGO_PORT}/{MONGO_DB}"
#     )
# 
# def get_gq_cli():
#     return GraphQLClient(endpoint="https://blog.laisky.com/graphql/query/")


import aiohttp
import aiohttp_jinja2
from aiographql.client import GraphQLRequest
from ramjet.utils import get_conn, get_gq_cli
    _gq = get_gq_cli()
    _mongo = get_conn()

    @property
    def col(self):
        return self._mongo["twitter"]["tweets"]

    @property
    def db(self):
        return self._mongo["twitter"]

    @property
    def gq(self):
        return self._gq


class Status(BaseDisplay):
    @aiohttp_jinja2.template("twitter/tweet.html")
    async def get(self):
        tweet_id = self.request.match_info["tweet_id"]
        query = GraphQLRequest(
            query=f"""
            query {{
                TwitterStatues(
                    tweet_id: "{tweet_id}",
                ) {{
                    text
                    url
                    created_at
                    images

# Path: ramjet/utils/db.py
# def get_conn():
#     return pymongo.MongoClient(
#         f"mongodb://{MONGO_USER}:{MONGO_PASSWD}@{MONGO_HOST}:{MONGO_PORT}/{MONGO_DB}"
#     )
# 
# def get_gq_cli():
#     return GraphQLClient(endpoint="https://blog.laisky.com/graphql/query/")


# Path: ramjet/tasks/twitter/display.py
import aiohttp
import aiohttp_jinja2
from aiographql.client import GraphQLRequest
from ramjet.utils import get_conn, get_gq_cli

    _gq = get_gq_cli()
    _mongo = get_conn()

    @property
    def col(self):
        return self._mongo["twitter"]["tweets"]

    @property
    def db(self):
        return self._mongo["twitter"]

    @property
    def gq(self):
        return self._gq


class Status(BaseDisplay):
    @aiohttp_jinja2.template("twitter/tweet.html")
    async def get(self):
        tweet_id = self.request.match_info["tweet_id"]
        query = GraphQLRequest(
            query=f"""
            query {{
                TwitterStatues(
                    tweet_id: "{tweet_id}",
                ) {{
                    text
                    url
                    created_at
                    images

                    user {{