Database Access Architecture

Resolvers should generally avoid becoming large database-access modules. A cleaner architecture places domain and persistence logic behind services or repositories.

This separation allows GraphQL to remain an API layer while the underlying business logic can be reused by background jobs, REST endpoints, event consumers, or other interfaces.

The architecture should also provide a deliberate strategy for transactions and consistency.