File: subclass_tagged_union.md

package info (click to toggle)
python-apischema 0.18.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,608 kB
  • sloc: python: 15,266; sh: 7; makefile: 7
file content (9 lines) | stat: -rw-r--r-- 279 bytes parent folder | download
1
2
3
4
5
6
7
8
9
# 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!}
```