Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try and encapsulate data for an object better #54

Open
alastair opened this issue Nov 12, 2020 · 0 comments
Open

Try and encapsulate data for an object better #54

alastair opened this issue Nov 12, 2020 · 0 comments

Comments

@alastair
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant