Currently we create objects by passing data in as parameters. We don't have many methods that retrieve data, but the ones that do return this data as dictionaries.
We should improve the way that we store this data. Either with dataclasses, or pydantic.
This will require that we parse sub objects in a way that allows us to create relationships where needed in graphql (e.g. a work's composer), and to parse these results from a query back into an object.
Ideally this would be the role of a graphql python library - we should double-check if there are any new libraries that can help us with this.
Currently we create objects by passing data in as parameters. We don't have many methods that retrieve data, but the ones that do return this data as dictionaries. We should improve the way that we store this data. Either with dataclasses, or pydantic. This will require that we parse sub objects in a way that allows us to create relationships where needed in graphql (e.g. a work's composer), and to parse these results from a query back into an object. Ideally this would be the role of a graphql python library - we should double-check if there are any new libraries that can help us with this.