0
点赞
收藏
分享

微信扫一扫

graphql .net

i奇异 2022-10-07 阅读 237

安装
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);
}
}

客户端工具
altair_4.6.2_x64_win 类似postman

[参考]
​​​GraphQL.NET​​

留待后查,同时方便他人



举报

相关推荐

0 条评论