INNER CODE UNIT · Python

__init__

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

    def __init__(self, name: str, typ: TypeRef):
        self.name = name
        self.type = typ

    def __str__(self):
        return f'{{ "name": {self.name}, "type": {str(self.type)} }}'

    def to_json(self):
        return {
            "defaultValue": None,
            "description": None,
            "name": self.name,
            "type": self.type.to_json(),
        }

    @classmethod
    def from_json(cls, jso: Dict[str, Any]) -> "InputValue":
        name = jso["name"]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…