| 1 |
# Class as tagged union of its subclasses |
| 2 |
|
| 3 |
*From [https://github.com/wyfo/apischema/discussions/56](https://github.com/wyfo/apischema/discussions/56)* |
| 4 |
|
| 5 |
Tagged unions are useful when it comes to GraphQL input (or even output). |
| 6 |
|
| 7 |
```python |
| 8 |
{!examples/subclass_tagged_union.py!} |
| 9 |
``` |