Last active
October 10, 2017 18:48
-
-
Save mczachurski/490595a98ce805bdc845ea267ab69b26 to your computer and use it in GitHub Desktop.
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
public class GroupsResolver : Resolver, IGroupsResolver | |
{ | |
private readonly IGroupsService _groupsService; | |
public GroupsResolver(IGroupsService groupsService) | |
{ | |
_groupsService = groupsService; | |
} | |
public void Resolve(GraphQLQuery graphQLQuery) | |
{ | |
graphQLQuery.Field<ListGraphType<GroupType>>( | |
"groups", | |
resolve: context => _groupsService.GetGroupsAsync() | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment