Get the object type definition for the given name.
(self, name: str)
| 472 | return await asyncify(self._converter.unstructure, obj, unstructure_as) |
| 473 | |
| 474 | def get_object(self, name: str) -> ObjectType: |
| 475 | """Get the object type definition for the given name.""" |
| 476 | try: |
| 477 | return self._objects[name] |
| 478 | except KeyError: |
| 479 | # Not expected to happen during invoke because registration should |
| 480 | # fail first. |
| 481 | msg = f"No '@dagger.object_type' decorated class named '{name}' was found" |
| 482 | extra = {"objects_found": self._objects.keys()} |
| 483 | raise ObjectNotFoundError(msg, extra=extra) from None |
| 484 | |
| 485 | async def _get_parent_instance( |
| 486 | self, |