de.hftstuttgart.vs.ss.2023/task06
2023-05-08 10:28:19 +02:00
..
.mvn/wrapper Added task06 2023-05-08 08:58:13 +02:00
src Added task06 2023-05-08 08:58:13 +02:00
.gitignore Added task06 2023-05-08 08:58:13 +02:00
mvnw Added task06 2023-05-08 08:58:13 +02:00
mvnw.cmd Added task06 2023-05-08 08:58:13 +02:00
pom.xml Added task06 2023-05-08 08:58:13 +02:00
Readme.md Add link to GraphiQL 2023-05-08 10:28:19 +02:00

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.

You can access GraphiQL with the url http://localhost:8080/graphiql.

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.

  1. Define your *.graphqls file
  2. Generate all necessary files (maven compile)
  3. Implement a simple server using the GraphQLAPI-Controller. You may use BlogController and the given methods. The already implemented mappers will help you, just remove the comments.
  4. Test your API using GraphiQL or using the integrated GraphQL-Client in your IDE