- Net Core 3.1.3
- DotNet Command (.NET Core CLI)
Execute
[source code path]
> dotnet new webapi -n GraphQLNetCore --auth none
Execute
[csproj's path created above]
> dotnet add package GraphQL -v 2.4.0
> dotnet add package Microsoft.EntityFrameworkCore -v 3.1.3
> dotnet add package Microsoft.EntityFrameworkCore.InMemory -v 3.1.3
> dotnet add package GraphQL.Server.Ui.Playground -v 3.4.0
Open IDE (VS 2019 ir VS Code) to add new item to collection profile:
"Playground": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "ui/playground",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:59370/"
}
- Open IDE (VS 2019 ir VS Code) to add new entry:
"GraphQLPath": "/graphql"
The VS is an excellent for run the playground.
- Go to .net core folder exercise.
- Open the project (.csproj file)
- F5.
- Open CMD
- Go to project folder
- Execute Dotnet Run
- from any browse type [http://localhost:59370/ui/playground] in order to test any query or mutation