public Query(IQuestionarioService service) { Field <ListGraphType <QuestaoType> >( Questoes, resolve: context => { return(service.Get().Result); } ); Field <ListGraphType <ProvaType> >( Rank, resolve: context => { return(service.Rank().Result); } ); Field <ListGraphType <ProvaType> >( Prova, arguments: new QueryArguments( new QueryArgument <ProvaInputType> { Name = Input } ), resolve: context => { var prova = context.GetArgument <Prova>(Input); return(service.GetByEmail(prova?.Email).Result); } ); }
public Task <IEnumerable <Prova> > Rank(string email) { return(_service.GetByEmail(email)); }