tercul-backend/internal/app/collection
google-labs-jules[bot] 8ddc4a7986 This commit refactors the GraphQL layer to improve code quality and adhere to the project's target architecture.
Key changes include:
- Moved authorization logic for collection mutations from the GraphQL resolvers to the application service layer, ensuring that ownership checks are handled consistently within the business logic.
- Updated the `collection` command handlers and input structs to accept a user ID for authorization.
- Removed orphaned code, including unused resolver definitions (`workResolver`, `translationResolver`) and misplaced helper functions from `schema.resolvers.go`.
- Re-implemented the `Stats` resolvers for the `Work` and `Translation` types, ensuring they correctly call the `analytics` application service.
- Fixed several build errors related to type mismatches and redeclared functions by regenerating the GraphQL code and correcting helper function signatures.
- Updated integration tests to provide authenticated user context for collection mutations, ensuring that the new authorization checks pass.
2025-10-03 02:13:12 +00:00
..
commands.go This commit refactors the GraphQL layer to improve code quality and adhere to the project's target architecture. 2025-10-03 02:13:12 +00:00
queries.go Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
service.go Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00