Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ashutoshsahoo/gs-graphql-practice
Spring boot and GraphQL Playground
https://github.com/ashutoshsahoo/gs-graphql-practice
docker gradle graphql graphql-java graphql-playground graphql-schema graphql-tools h2 h2-database jib jib-docker-package jib-gradle jib-plugin spring-boot
Last synced: about 2 months ago
JSON representation
Spring boot and GraphQL Playground
- Host: GitHub
- URL: https://github.com/ashutoshsahoo/gs-graphql-practice
- Owner: ashutoshsahoo
- Created: 2020-05-23T06:13:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-06T16:51:53.000Z (almost 3 years ago)
- Last Synced: 2024-10-12T13:20:30.392Z (3 months ago)
- Topics: docker, gradle, graphql, graphql-java, graphql-playground, graphql-schema, graphql-tools, h2, h2-database, jib, jib-docker-package, jib-gradle, jib-plugin, spring-boot
- Language: Java
- Size: 69.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spring Boot with GraphQL (GraphQL Playground)
## Getting Started
### Run application
- Run the application using `gradle bootRun`
- Open `http://localhost:8080/graphiql` in browser
### Test Application
- Query Employee
```graphql
{
employees {
id
name
salary
}
}
```and inside REQUEST HEADERS
```json
{
"Authorization": "Basic YWRtaW46YWRtaW4="
}
```Response :
```json
{
"data": {
"employees": [
{
"id": "1",
"name": "Andi",
"salary": "42"
}
]
}
}
```### Run application inside docker
```shell
gradle build
gradle jibDockerBuild
docker run -d -p 8080:8080 ashutoshsahoo/gs-graphql
docker ps
docker stop
docker rm
```### Reference Documentation
For further reference, please consider the following sections:
* [Spring-GraphQL](https://docs.spring.io/spring-graphql/docs/1.0.0-M5/reference/html/)
* [Spring-GraphQL-Github](https://github.com/spring-projects/spring-graphql)
* [Official Gradle documentation](https://docs.gradle.org)
* [Spring Boot Gradle Plugin Reference Guide](https://docs.spring.io/spring-boot/docs/2.7.0-M2/gradle-plugin/reference/html/)
* [Create an OCI image](https://docs.spring.io/spring-boot/docs/2.7.0-M2/gradle-plugin/reference/html/#build-image)
* [Spring Boot DevTools](https://docs.spring.io/spring-boot/docs/2.6.4/reference/htmlsingle/#using-boot-devtools)
* [Spring Web](https://docs.spring.io/spring-boot/docs/2.6.4/reference/htmlsingle/#boot-features-developing-web-applications)
* [Spring Security](https://docs.spring.io/spring-boot/docs/2.6.4/reference/htmlsingle/#boot-features-security)
* [Spring Data JPA](https://docs.spring.io/spring-boot/docs/2.6.4/reference/htmlsingle/#boot-features-jpa-and-spring-data)
* [Spring Boot Actuator](https://docs.spring.io/spring-boot/docs/2.6.4/reference/htmlsingle/#production-ready)
* [Jib - Containerize your Gradle Java project](https://github.com/GoogleContainerTools/jib/tree/master/jib-gradle-plugin)### Guides
The following guides illustrate how to use some features concretely:
* [Building a RESTful Web Service](https://spring.io/guides/gs/rest-service/)
* [Serving Web Content with Spring MVC](https://spring.io/guides/gs/serving-web-content/)
* [Building REST services with Spring](https://spring.io/guides/tutorials/bookmarks/)
* [Securing a Web Application](https://spring.io/guides/gs/securing-web/)
* [Spring Boot and OAuth2](https://spring.io/guides/tutorials/spring-boot-oauth2/)
* [Authenticating a User with LDAP](https://spring.io/guides/gs/authenticating-ldap/)
* [Accessing Data with JPA](https://spring.io/guides/gs/accessing-data-jpa/)
* [Building a RESTful Web Service with Spring Boot Actuator](https://spring.io/guides/gs/actuator-service/)### Additional Links
These additional references should also help you:
* [Gradle Build Scans – insights for your project's build](https://scans.gradle.com#gradle)