This PR abstracts data layer into proper context classes.
BaseRepository is used for generic repositories and has basic queries implementations for find(), for many entities result, and first(), for a single entity result.
If complex queries are needed, a new repository class can be created (see TransactionsRepository and BoxRepository as example)
All repositories are grouped into DatabaseContext which instantiated in GraphQL context param.
This PR abstracts data layer into proper context classes.
BaseRepository
is used for generic repositories and has basic queries implementations forfind()
, for many entities result, andfirst()
, for a single entity result.TransactionsRepository
andBoxRepository
as example)DatabaseContext
which instantiated in GraphQL context param.