Top level query object type (a.k.a. Query).
| 80 | |
| 81 | |
| 82 | class Root(Type): |
| 83 | """Top level query object type (a.k.a. Query).""" |
| 84 | |
| 85 | @override |
| 86 | def __init__(self, ctx: Context | None = None): |
| 87 | if ctx is None: |
| 88 | from ._core import Context |
| 89 | |
| 90 | ctx = Context() |
| 91 | |
| 92 | super().__init__(ctx) |
| 93 | |
| 94 | @classmethod |
| 95 | def from_connection(cls, conn: BaseConnection): |
| 96 | """Create a new instance of the root type, using the given connection.""" |
| 97 | from ._core import Context |
| 98 | |
| 99 | return cls(Context(conn)) |
| 100 | |
| 101 | @classmethod |
| 102 | def _graphql_name(cls) -> str: |
| 103 | return "Query" |
nothing calls this directly
no outgoing calls
no test coverage detected