INNER CODE UNIT · Python

__init__

gsmith257-cyber/GraphCrawler · clairvoyance/graphql.py:284

    def __init__(self, name: str, typeref: TypeRef, args: List[InputValue] = None):
        if not typeref:
            raise Exception(f"Can't create {name} Field from {typeref} TypeRef.")

        self.name = name
        self.type = typeref
        self.args = args or []

    def to_json(self):
        return {
            "args": [a.to_json() for a in self.args],
            "deprecationReason": None,
            "description": None,
            "isDeprecated": False,
            "name": self.name,
            "type": self.type.to_json(),
        }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…