(
self, headers: dict[str, Any], data: dict[str, Any], data_path: list[str], klass: type[T_gh]
)
| 690 | return {key: cls.paths_of_dict(val) if isinstance(val, dict) else None for key, val in d.items()} |
| 691 | |
| 692 | def data_as_class( |
| 693 | self, headers: dict[str, Any], data: dict[str, Any], data_path: list[str], klass: type[T_gh] |
| 694 | ) -> T_gh: |
| 695 | for item in data_path: |
| 696 | if item not in data: |
| 697 | raise RuntimeError(f"GraphQL path {data_path} not found in data: {self.paths_of_dict(data)}") |
| 698 | data = data[item] |
| 699 | if klass.is_rest(): |
| 700 | data = as_rest_api_attributes(data) |
| 701 | return klass(self, headers, data) |
| 702 | |
| 703 | def graphql_query(self, query: str, variables: dict[str, Any]) -> tuple[dict[str, Any], dict[str, Any]]: |
| 704 | """ |
no test coverage detected