https://github.com/linux-china/rest-graphql-rsocket-demo
One controller to combine HTTP REST, GraphQL and RSocket
https://github.com/linux-china/rest-graphql-rsocket-demo
graphql http-rest rsocket
Last synced: 11 days ago
JSON representation
One controller to combine HTTP REST, GraphQL and RSocket
- Host: GitHub
- URL: https://github.com/linux-china/rest-graphql-rsocket-demo
- Owner: linux-china
- License: apache-2.0
- Created: 2021-09-03T00:32:17.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-23T07:24:53.000Z (about 3 years ago)
- Last Synced: 2025-04-26T12:13:15.247Z (11 months ago)
- Topics: graphql, http-rest, rsocket
- Language: Java
- Homepage:
- Size: 40 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
REST-GraphQL-RSocket combo demo
===============================
Spring Boot app with HTTP REST API, GraphQL and RSocket.
# Features
* HTTP REST API
```http request
GET http://localhost:8080/book/book-1
```
* RSocket Request
```http request
### RSocket request
RSOCKET findBook
Host: ws://localhost:8080/rsocket
Content-Type: application/json
"book-1"
```
* GraphQL over HTTP
```http request
### GraphQL over HTTP
GRAPHQL http://localhost:8080/graphql
Content-Type: application/graphql
query {
findBook(id: "book-1") { id name }
}
```
* RSocket over WebSocket
```http request
### GraphQL over WebSocket
GRAPHQLWS localhost:8080/graphql
Content-Type: application/graphql
query {
findBook(id: "book-1") { id name }
}
```
* GraphQL over RSocket
```http request
### GraphQL over RSocket
GRAPHQLRS graphql
Host: ws://localhost:8080/rsocket
Content-Type: application/graphql
query {
findBook(id: "book-1") { id name }
}
```
# References
* Spring GraphQL: https://spring.io/projects/spring-graphql
* Spring Boot GraphQL: https://docs.spring.io/spring-graphql/docs/1.0.0-RC1/reference/html/
* RSocket: https://rsocket.io/
* RSocket JetBrains Plugin: https://plugins.jetbrains.com/plugin/18195-rsocket-requests-in-http-client
* httpx JetBrains Plugin: https://plugins.jetbrains.com/plugin/18807-httpx-requests