https://github.com/ztrzaska/graphql
A reference implementation of GraphQL for Spring boot
https://github.com/ztrzaska/graphql
graphql graphql-server hibernate-validator playground spring-boot
Last synced: 2 months ago
JSON representation
A reference implementation of GraphQL for Spring boot
- Host: GitHub
- URL: https://github.com/ztrzaska/graphql
- Owner: ztrzaska
- Created: 2022-07-23T07:16:21.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-02-07T20:15:48.000Z (almost 3 years ago)
- Last Synced: 2025-01-29T09:30:54.303Z (11 months ago)
- Topics: graphql, graphql-server, hibernate-validator, playground, spring-boot
- Language: Java
- Homepage:
- Size: 143 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A reference implementation of GraphQL for Spring boot
### Getting Started
The following application illustrate simple functionalities with graphQL API. It has queries and mutations. Default queries are written to playground.
At dedicated branches there are integration with two different graphql libraries, graphql-java-kickstart and spring for graphql.
### Playground
```
http://localhost:9001/playground
```
### Voyager
```
http://localhost:9001/voyager
```
### Curl
```
curl --url http://localhost:9001/graphql -H 'Accept:application/json' --data-binary "{\"query\": \"query { books { id name }}\", \"variables\" : {}}"
```
### Uploading file to server
```
curl -v -F operations="{\"query\": \"mutation { uploadFile }\", \"variables\" : {}}" -F upload=@D:/a.txt http://localhost:9001/graphql
```
## Documentation of the libraries used
* [GraphQL documentation](https://graphql.org/)
* [GraphQL Extended scalars documentation](https://github.com/graphql-java/graphql-java-extended-scalars)
* [Spring for GraphQL documentation](https://spring.io/projects/spring-graphql)
* [Graphql-java-kickstart github](https://github.com/graphql-java-kickstart)
* [Spring boot](https://docs.spring.io/spring-boot/docs/current/reference/html/)
* [Hibernate validator](https://hibernate.org/validator/)