Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 8 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 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-23T07:24:53.000Z (about 2 years ago)
- Last Synced: 2024-12-24T23:43:44.410Z (9 days ago)
- Topics: graphql, http-rest, rsocket
- Language: Java
- Homepage:
- Size: 40 KB
- Stars: 5
- Watchers: 4
- 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/graphqlquery {
findBook(id: "book-1") { id name }
}
```* RSocket over WebSocket
```http request
### GraphQL over WebSocket
GRAPHQLWS localhost:8080/graphql
Content-Type: application/graphqlquery {
findBook(id: "book-1") { id name }
}
```* GraphQL over RSocket
```http request
### GraphQL over RSocket
GRAPHQLRS graphql
Host: ws://localhost:8080/rsocket
Content-Type: application/graphqlquery {
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