Thanx for your article and sample. It works fine.
One question: I'd like to add 2 new queries. How to do it? where need to add them?
public class PostsQuery2 : ObjectGraphType<object>
{
private readonly IPostService _postService;
public PostsQuery2(IPostService postService)
{
this._postService = postService;
this.Name = "Query2";
this.FieldAsync<ListGraphType<PostType>>(
"posts",
resolve: async c => await this._postService.GetPostsAsync());
this.FieldAsync<PostType>(
"post",
arguments: new QueryArguments(
new QueryArgument<NonNullGraphType<IntGraphType>>() { Name = "id", Description = "Post ID" }),
resolve: async c => await this._postService.GetPostByIdAsync(c.GetArgument<int>("id")));
}
}