-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #205 from ipdae/improve/issue-204
Add current block index in world boss ranking query
- Loading branch information
Showing
3 changed files
with
35 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
21 changes: 21 additions & 0 deletions
21
NineChronicles.DataProvider/GraphTypes/WorldBossRankingInfoType.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
namespace NineChronicles.DataProvider.GraphTypes | ||
{ | ||
using System.Collections.Generic; | ||
using GraphQL.Types; | ||
using NineChronicles.DataProvider.Store.Models; | ||
|
||
public class WorldBossRankingInfoType : ObjectGraphType<(long blockIndex, List<WorldBossRankingModel> worldBossRankingModels)> | ||
{ | ||
public WorldBossRankingInfoType() | ||
{ | ||
Field<NonNullGraphType<LongGraphType>>( | ||
"blockIndex", | ||
resolve: context => context.Source.blockIndex | ||
); | ||
Field<NonNullGraphType<ListGraphType<WorldBossRankingType>>>( | ||
"rankingInfo", | ||
resolve: context => context.Source.worldBossRankingModels | ||
); | ||
} | ||
} | ||
} |
This file contains 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