From the course: Spring with GraphQL
Unlock the full course today
Join today to access over 24,200 courses taught by industry experts.
Creating the schema - Spring Tutorial
From the course: Spring with GraphQL
Creating the schema
- [Instructor] As with any good web service API, the best thing to do is to start with your schema. I've gone on records on that many times, that schema-first development is the way to go, and with GraphQL, it's the best way with Spring Boot to do this. So let's go ahead and jump in and start creating our first schema. All right, so let's open up H+, go to source/main/resources, and I want you to start by creating a new directory, and that directory name is GraphQL. Now, this is by convention. Spring Boot is going to load your schema under source/main/resources/GraphQL. You can change that behavior through the application properties if you don't want to use this folder structure, but it doesn't really matter as long as it loads in, and there's no reason to not just use what comes out of the box. It just makes it easier for everybody who may be using your work down line. So within here, we're going to create a new file,…
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)
Setting up the project4m 18s
-
(Locked)
Creating the schema4m 5s
-
(Locked)
Creating a Spring Data repository5m 41s
-
(Locked)
Creating the GraphQL controller6m 44s
-
(Locked)
Mutations5m 32s
-
(Locked)
Errors4m 8s
-
(Locked)
Challenge: Extending the API1m 19s
-
(Locked)
Solution: Extending the API4m 4s
-
(Locked)
-