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.
Adding your first object graph type (course entity)
From the course: ASP.NET Core: Building a GraphQL API
Adding your first object graph type (course entity)
- [Instructor] On this part, we are going to create the first object type in our project. And for that, we are going to create the course type. So let us go to Visual Studio and see it in action. In here, I'll just go to the Solution Explorer and then I'll create a new folder. So add and then new folder. I'm going to name GraphQL because in here I'm going to put all the GraphQL related code for GraphQL. And then inside here we are going to have types, so I'll just right-click then go to new folder. I'm going to name this folder the types folder. And here we are going to add the first type and that is going to be the course type. And the reason why we are adding the course type is because in the data folder, in the models, we have the course model. And this course is just a C# class. It has some properties. The first one is of type integer, but it has the key decoration in here, which means it's going to be the primary…
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.
Contents
-
-
-
-
(Locked)
Operations in GraphQL1m 19s
-
(Locked)
Types in GraphQL3m 32s
-
(Locked)
Adding your first object graph type (course entity)5m 28s
-
(Locked)
Adding your first query: All courses3m 51s
-
(Locked)
Challenge: Add query to get single course47s
-
(Locked)
Solution: Add query to get single course4m 12s
-
(Locked)
Adding your GraphQL schema file1m 49s
-
(Locked)
Testing4m 23s
-
(Locked)
-
-
-