From the course: ASP.NET Core: Building a GraphQL API

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Testing

Testing

- [Instructor] So now that we have created all we need to create to set up the GraphQL in our web API application, we are going to start our app and test what we have created so far. But before we do that, we need to add one more line. So let us go to Visual Studio and see it in action. In Visual Studio, just go to the Startup.cs file. And then in here scroll down to the Configure method. And then in here, comment out this line. So app.UseGraphQL. And in here we are going to use the AppSchema class. So let us just import the namespace, GraphQL, and here add semicolons, save all the changes, and start this project. So on here we can see that the app ran successfully. Now let us just go to our GraphQL. So for that, in here we define that the GraphQL you are at least going to be UI, and then slash GraphQL, and then press enter. And now you can see that the GraphIQL is loaded. Now to get data from our queries, I'll…

Contents