Introduce Repository Layer to `Agent` domain GQL resolvers
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
## Summary
Currently, the repository layer is only partially applied to GQL objects related to the Agent domain, or it is not applied at all. The current structure where the API Layer accesses the database directly makes code changes difficult and hinders code reuse. Especially at this point, where we aim to migrate the GQL library from Graphene to Strawberry, introducing layers with distinct roles and responsibilities while minimizing dependencies between them will become increasingly important.
Therefore, we plan to introduce the Repository Layer pattern into the resolvers for GQL objects related to the Agent domain (`Agent`, `AgentNode`, `AgentSummary`). Currently, the Repository Layer in [http://Backend.AI](http://Backend.AI) holds dependencies on multiple Stateful Sources and Cache Sources, and performs the role of combining these sources. Through this refactoring, we aim to separate actions such as accessing the DB to persist data or retrieve persisted data, and actions like storing or retrieving data via the valkey client (whether cached or arbitrary) from the API Layer.
##
JIRA Issue: BA-2725
Contributor guide
Assessment
This issue has not been assessed yet.