Join Glenn Block for an in-depth discussion in this video Create the OrderEventType, part of API Development in .NET with GraphQL.
- [Instructor] Let's go implement our schema. So the first thing we're going to need to do is create our order event type which will map to our order event. Similar to what we've done in the past for our other models. So we're going to create a new class. Right click on the schema, create a new class and we'll call it order event type. We'll just add some using statements on the top. So we'll use GraphQL.Types and we're also going to be accessing our order event so we'll also do that as well.
We'll access our models. We'll make this public. And we will also make it inherit object graph type of order event. Okay, now we're going to create our constructor and we're going to start adding our fields. So we'll do ID. Name.
The order ID. We'll also add our status. And we'll supply a resolve method. And we'll access the status off of the context.
Then finally expose the timestamp. Great.
- Creating a new GraphQL project
- Exposing a new GraphQL API
- Enabling and creating mutations
- Updating and configuring the schema
- Enabling subscriptions
- New GraphQL.NET schema classes
- Creating the OrderEventType
Skill Level Intermediate
Docker for .NET Developers with Visual Studiowith Lee Brandt46m 52s Intermediate
Java Integration with .NET Frameworkwith Reynald Adolphe2h 39m Intermediate
1. Creating a New GraphQL Project
What we're going to build2m 22s
2. Exposing a New GraphQL API
3. Allowing Updates through Mutations
4. Enabling Clients to Subscribe to Notifications
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.