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.
Add data: Testing
From the course: ASP.NET Core: Building a GraphQL API
Add data: Testing
- [Instructor] On this part, we are going to test what we have built so far. So we are going to test the ad course from the CourseMutation file. For that let us go to Visual Studio and see it in action. Here the first thing that we need to do is we need to go to the Startup.cs file and then here scroll down, go to ConfigureServices and you can see that we have already configured the CourseQuery. So let us also configure the CourseMutation. So services.AddScoped, and then you are going to add the CourseMutation. Now, let us just import the name space for the CourseMutation and that is the GraphQL.Mutations. Then next, let us just go to the AppSchema. So just right click then go to definition. And here in the AppSchema we have also configured the query to be the CourseQuery. So let us also configure the mutation files, so CourseMutation and then just mutation, let's import the namespace for the CourseMutation that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.