File tree Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Expand file tree Collapse file tree 1 file changed +28
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,34 @@ In addition to the GraphQL [reference implementations in JavaScript](#javascript
42
42
43
43
### C# / .NET
44
44
45
- - [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
45
+ #### [graphql-dotnet](https://github.com/graphql-dotnet/graphql-dotnet): GraphQL for .NET
46
+
47
+ \`\`\`csharp
48
+ using System;
49
+ using GraphQL;
50
+ using GraphQL.Types;
51
+
52
+ public class Program
53
+ {
54
+ public static void Main(string[] args)
55
+ {
56
+ var schema = Schema.For(@"
57
+ type Query {
58
+ hello: String
59
+ }
60
+ ");
61
+
62
+ var json = schema.Execute(_ =>
63
+ {
64
+ _.Query = "{ hello }";
65
+ _.Root = new { Hello = "Hello World!" };
66
+ });
67
+
68
+ Console.WriteLine(json);
69
+ }
70
+ }
71
+ \`\`\`
72
+
46
73
- [graphql-net](https://github.com/ckimes89/graphql-net): Convert GraphQL to IQueryable
47
74
- [Hot Chocolate](https://github.com/ChilliCream/hotchocolate): GraphQL Server for .NET core and .NET classic
48
75
You can’t perform that action at this time.
0 commit comments