mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
This commit refactors the analytics service to align with the new DDD architecture and exposes it through the GraphQL API. Key changes: - A new `AnalyticsService` has been created in `internal/application/services` to encapsulate analytics-related business logic. - The GraphQL resolver has been updated to use the new `AnalyticsService`, providing a clean and maintainable API. - The old analytics service and its related files have been removed, reducing code duplication and confusion. - The `bookmark`, `like`, and `work` services have been refactored to remove their dependencies on the old analytics repository. - Unit tests have been added for the new `AnalyticsService`, and existing tests have been updated to reflect the refactoring.
16 lines
342 B
Go
16 lines
342 B
Go
package graphql
|
|
|
|
import (
|
|
"tercul/internal/app"
|
|
"tercul/internal/application/services"
|
|
)
|
|
|
|
// This file will not be regenerated automatically.
|
|
//
|
|
// It serves as dependency injection for your app, add any dependencies you require here.
|
|
|
|
type Resolver struct {
|
|
App *app.Application
|
|
AnalyticsService services.AnalyticsService
|
|
}
|