java-tutorials/spring-boot-modules/spring-boot-graphql
timis1 e6501ada07 JAVA-26705 Upgrade lombok to latest version (#15305)
Co-authored-by: timis1 <noreplay@yahoo.com>
2023-12-03 21:19:12 +02:00
..
src JAVA-26705 Upgrade lombok to latest version (#15305) 2023-12-03 21:19:12 +02:00
GraphQL collection.postman_collection.json
README.md Update README.md 2022-12-07 19:35:24 +08:00
pom.xml JAVA-26705 Upgrade lombok to latest version (#15305) 2023-12-03 21:19:12 +02:00

README.md

Spring Boot Graphql

This module contains articles about Spring Boot Graphql

The Course

The "REST With Spring" Classes: http://bit.ly/restwithspring

Relevant Articles:

GraphQL sample queries

Query

curl \
--request POST 'localhost:8080/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"query {\n    recentPosts(count: 2, offset: 0) {\n        id\n        title\n        author {\n            id\n            posts {\n                id\n            }\n        }\n    }\n}"}'

Mutation

curl \
--request POST 'localhost:8080/graphql' \
--header 'Content-Type: application/json' \
--data-raw '{"query":"mutation {\n    createPost(title: \"New Title\", authorId: \"Author2\", text: \"New Text\") {\n id\n       category\n        author {\n            id\n            name\n        }\n    }\n}"}'