graphql .net
作者:互联网
安装
GraphQL 7.0.0
GraphQL.SystemTextJson 7.0.0
HelloWorld
public class Program
{
public static async Task Main(string[] args)
{
var schema = Schema.For(@"
type Query {
hello: String
}
");
var json = await schema.ExecuteAsync(_ =>
{
_.Query = "{ hello }";
_.Root = new { Hello = "Hello World!" };
});
Console.WriteLine(json);
}
}
[参考]
GraphQL.NET
标签:7.0,public,json,GraphQL,var,graphql,net,Hello 来源: https://www.cnblogs.com/ives/p/16591219.html