I developed a .net core 3.1 web API and I've added GraphQL and PlayGround to it. When I try to start the Playground I encountered this error that bored me. I googled too many times and I have read many articles and forums about it and I've tried their suggested ways but still, the problem exists. Also, I should say I haven't this problem with .net core 2.2.
I decided to simplify my solution and remove the extra foliage of my project and upload it to you that you can help me.
The simplified version of that project I'm currently working on it is available here on google drive.
Also, I found a solution with .net core 3.1 that hasn't this problem but still, I can't find my mistake(s). I've uploaded this correct solution here.
In this simplified version I didn't connect to the database and didn't add any related of its packages to the project. I'm returning in-memory data in this simplified version instead of contacting the database.
This is the picture of the error that I'm facing:
And The .csproj file of the simplified project is like below:
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RootNamespace>NetCore3._1GraphQL</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="graphiql" Version="1.2.0" />
<PackageReference Include="GraphQL" Version="3.0.0-preview-1352" />
<PackageReference Include="GraphQL.Server.Ui.Playground" Version="3.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
<PackageReference Include="RandomNameGeneratorLibrary" Version="1.2.2" />
</ItemGroup>
</Project>