# Class as tagged union of its subclasses 

*From [https://github.com/wyfo/apischema/discussions/56](https://github.com/wyfo/apischema/discussions/56)*

Tagged unions are useful when it comes to GraphQL input (or even output).

```python
{!examples/subclass_tagged_union.py!}
```