Ejemplo n.º 1
0
        public PartyMutations(IPartyService partyService)
        {
            Name = "Mutation";

            Field <SongVoteGraphType>("addVote",
                                      arguments: new QueryArguments(
                                          new QueryArgument <SongVoteInputGraphType> {
                Name = "vote"
            }
                                          ),
                                      resolve: context =>
            {
                SongVote receivedVote = context.GetArgument <SongVote>("vote");
                SongVote savedVote    = partyService.AddSongVote(receivedVote);
                return(savedVote);
            }
                                      );
        }