Dec 18 2023
dotnet add package HotChocolate.AspNetCore dotnet add package HotChocolate.AspNetCore.Playground
public class User { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public DateTime BirthDate { get; set; } }
public class UserQuery { private static List<User> users = new List<User>() { new User { Id = 1, FirstName = "Stefan", LastName = "Djokic", BirthDate = new DateTime(1995, 7, 4)}, new User { Id = 2, FirstName = "Dajana", LastName = "Milosevic", BirthDate = new DateTime(1996, 6, 22)}, }; public List<User> GetUsers() => users; }
services .AddRouting() .AddGraphQLServer() .AddQueryType<UserQuery>();
app.UseRouting(); app.MapGraphQL(); app.UsePlayground();
{ users { id firstName } }


1. Design Patterns that Deliver
This isn’t just another design patterns book. Dive into real-world examples and practical solutions to real problems in real applications.Check out it here.
Go-to resource for understanding the core concepts of design patterns without the overwhelming complexity. In this concise and affordable ebook, I've distilled the essence of design patterns into an easy-to-digest format. It is a Beginner level. Check out it here.
Every Monday morning, I share 1 actionable tip on C#, .NET & Arcitecture topic, that you can use right away.
Join 18,000+ subscribers to improve your .NET Knowledge.
Subscribe to the TheCodeMan.net and be among the 18,000+ subscribers gaining practical tips and resources to enhance your .NET expertise.