.. | ||
.mvn/wrapper | ||
src | ||
.gitignore | ||
mvnw | ||
mvnw.cmd | ||
pom.xml | ||
Readme.md |
Getting Started
This task might seem familiar for you ;) The project contains everything to get started with a GraphQL service.
Don't worry if it shows errors. Try to run maven compile
. It should fix those errors. Restarting IntelliJ
afterwards also helps.
Right now the project only provides a Hello World example for GraphQL.
Task 06
Let's develop a simple blog service. It's possible to create, update and delete posts. Not every post is published. You also need to provide a way to lock posts so that an author can edit them. Users can comment posts. A post contains the text itself, a state and the author. It is also possible to get the total count of comments for the post. A comment consist of the text and the user. Authors are also users. Users are managed by this service. They have a username as well as a first name and last name.
- Define your
*.graphqls
file - Generate all necessary files (
maven compile
) - Implement a simple server using the
GraphQLAPI
-Controller. You may useBlogController
and the given methods. The already implemented mappers will help you, just remove the comments. - Test your API using GraphiQL or using the integrated GraphQL-Client in your IDE