Hot Chocolate is the most popular GraphQL library for .NET. Here’s a quick start.
Setup
services.AddGraphQLServer()
.AddQueryType<Query>()
.AddMutationType<Mutation>();Query Type
public class Query
{
public IQueryable<Book> GetBooks([Service] AppDbContext ctx)
=> ctx.Books;
}References
Discover more from C4: Container, Code, Cloud & Context
Subscribe to get the latest posts sent to your email.