https://github.com/conorheffron/graphql-box
GraphQL Playground
https://github.com/conorheffron/graphql-box
graphql jdk17 lombok postman-collection spring-boot-2
Last synced: 6 months ago
JSON representation
GraphQL Playground
- Host: GitHub
- URL: https://github.com/conorheffron/graphql-box
- Owner: conorheffron
- License: mit
- Created: 2024-07-29T04:45:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-02T17:23:30.000Z (almost 2 years ago)
- Last Synced: 2025-02-05T08:05:52.539Z (over 1 year ago)
- Topics: graphql, jdk17, lombok, postman-collection, spring-boot-2
- Language: Java
- Homepage: https://conorheffron.github.io/graphql-box/
- Size: 599 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# graphql-box
[](https://github.com/conorheffron/graphql-box/actions/workflows/maven.yml)
## Technologies:
JDK corretto-17.0.9, Spring Boot 2, GraphQL, Maven 3
## Build & Run Tests:
```
mvn clean package
```
## Run Main Class Directly:
```
com.graphql.box.intro.GraphqlApplication
```
## GraphQL Queries & Mutation (Methods: Postman, Curl, & GraphiQL UI)
### Query
#### curl
```
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}"}'
```
#### GraphiQL UI

#### Postman

### Mutation
#### curl
```
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}"}'
```
#### GraphiQL UI
