tercul-backend/internal/adapters/graphql
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
..
model Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
.keep I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
binding.go feat(analytics): Enhance analytics capabilities 2025-09-07 19:26:51 +00:00
generated.go Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
helpers.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
integration_test.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
resolver.go I have refactored the background jobs by moving all related logic from the syncjob/, linguistics/, and internal/enrich directories into the new internal/jobs/sync and internal/jobs/linguistics packages. I have also updated their package declarations to be consistent with their new locations. 2025-09-02 15:02:04 +00:00
schema.graphqls Refactor: Introduce service layer for application logic 2025-09-09 02:28:25 +00:00
schema.resolvers.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
validation.go feat(analytics): Enhance analytics capabilities 2025-09-07 19:26:51 +00:00