84a93ffbd4
* BAEL-5756: Rest controller * BAEL-5756: GraphQL controller (without tests) * BAEL-5756: Fix GraphQL test * BAEL-5756: Fix GraphQL test 2 * BAEL-5756: GRPC working * BAEL-5756: GRPC with Spring Boot * BAEL-5756: Books proto service * BAEL-5756: Fix grpc integration test * BAEL-5756: Refactor * BAEL-5756: Revert some changes * BAEL-5756: Fix integration tests port issue between gRPC and GraphQL * BAEL-5756: Fix pom merge issue * BAEL-5756: Fix typo |
||
---|---|---|
.. | ||
src | ||
GraphQL collection.postman_collection.json | ||
README.md | ||
pom.xml |
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:
- Getting Started with GraphQL and Spring Boot
- Expose GraphQL Field with Different Name
- Error Handling in GraphQL With Spring Boot
- How to Test GraphQL Using Postman
- GraphQL vs REST
- REST vs. GraphQL vs. gRPC – Which API to Choose?
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}"}'