Conversation
Introduced `UserTournamentsService` to handle fetching and displaying tournaments a user has participated in or won. Updated `ApplicationUserResolvers` with new GraphQL resolvers (`GetPlayedTournaments` and `GetWonTournaments`) supporting pagination, filtering, and sorting. Added `UserPlayedTournamentIdsDataLoaders` and `UserWonTournamentIdsDataLoaders` for efficient batch fetching of tournament IDs using `Entity Framework`. Implemented helper methods in `UserTournamentsService` to handle paginated queries and integrate with batching contexts.
Added `WonTournaments` and `PlayedTournaments` properties to the `ApplicationUserNode` and `UserNode` classes in `ResponseModels.cs`. These properties, of type `TournamentsConnection?`, enable tracking of tournaments a user has won and participated in.
Dejmenek
deleted the
feat/140-add-wontournamentsplayedtournaments-fields-to-applicationuser
branch
September 12, 2026 15:04
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces functionality to query a user's tournament history (
wonTournamentsandplayedTournaments) via GraphQL, both directly through themequery and indirectly via theownerfield of a tournament. It also includes database updates, new tests, and performance optimizations.Changes
TournamentQueryTests.csandUserQueryTests.cs: Added new test cases forwonTournamentsandplayedTournamentsvalidation.ResponseModels.cs: ExtendedApplicationUserNodeandUserNodewithWonTournamentsandPlayedTournamentsfields.DatabaseSeeder.cs: AddedTournament 16with a completed bracket for testing.ApplicationUserResolvers.cs: Added resolvers forGetPlayedTournamentsandGetWonTournamentswith pagination, filtering, and sorting.UserTournamentsService.cs: Implemented service to fetch paginated tournament data for users, leveraging batching for performance.