We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a7a73f commit 97fdedeCopy full SHA for 97fdede
src/content/code/language-support/c-net/server/hot-chocolate.md
@@ -5,4 +5,32 @@ url: https://github.com/ChilliCream/hotchocolate
5
github: ChilliCream/hotchocolate
6
---
7
8
+```csharp
9
+using Microsoft.AspNetCore;
10
+using Microsoft.AspNetCore.Hosting;
11
+using Microsoft.AspNetCore.Builder;
12
+using Microsoft.Extensions.DependencyInjection;
13
14
+WebHost
15
+ .CreateDefaultBuilder(args)
16
+ .ConfigureServices(services =>
17
+ services
18
+ .AddGraphQLServer()
19
+ .AddQueryType<Query>())
20
+ .Configure(builder =>
21
+ builder
22
+ .UseRouting()
23
+ .UseEndpoints(e => e.MapGraphQL()))
24
+ .Build()
25
+ .Run();
26
+
27
+public class Query
28
+{
29
+ public Hero GetHero() => new Hero();
30
+}
31
32
+public class Hero
33
34
+ public string Name => "Luke Skywalker";
35
36
+```
0 commit comments