我对GraphQL还不熟悉,当我试图将.NET Core版本从2.2升级到3.0时,
在使用UseGraphiQL时,在/graphql页面上遇到了UI显示问题。
API正常工作,但UI显示不正确。我尝试通过谷歌搜索解决方案,但没有找到真正有用的。
以下是我的GraphQL配置:
services.AddRazorPages().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
app.UseGraphiQLServer(new GraphiQLOptions());
app.UseGraphiQl("/graphiql", "/graphql");
app.UseEndpoints(x =>
{
x.MapControllers();
});
非常感谢任何帮助,谢谢。