mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
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. |
||
|---|---|---|
| .. | ||
| model | ||
| .keep | ||
| binding.go | ||
| generated.go | ||
| helpers.go | ||
| integration_test.go | ||
| resolver.go | ||
| schema.graphqls | ||
| schema.resolvers.go | ||
| validation.go | ||