diff --git a/site/code/index.html.js b/site/code/index.html.js index 6a22c3fd22..1a6c1c4d9c 100644 --- a/site/code/index.html.js +++ b/site/code/index.html.js @@ -51,12 +51,14 @@ In addition to the GraphQL [reference implementations in JavaScript](#javascript \`\`\`csharp using System; +using System.Threading.Tasks; using GraphQL; using GraphQL.Types; +using GraphQL.SystemTextJson; // First add PackageReference to GraphQL.SystemTextJson public class Program { - public static void Main(string[] args) + public static async Task Main(string[] args) { var schema = Schema.For(@" type Query { @@ -64,7 +66,7 @@ public class Program } "); - var json = schema.Execute(_ => + var json = await schema.ExecuteAsync(_ => { _.Query = "{ hello }"; _.Root = new { Hello = "Hello World!" };