Skip to content

linux-china/rest-graphql-rsocket-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST-GraphQL-RSocket combo demo

Spring Boot app with HTTP REST API, GraphQL and RSocket.

Features

  • HTTP REST API
GET http://localhost:8080/book/book-1
  • RSocket Request
### RSocket request
RSOCKET findBook
Host: ws://localhost:8080/rsocket
Content-Type: application/json

"book-1"
  • GraphQL over HTTP
### GraphQL over HTTP
GRAPHQL http://localhost:8080/graphql
Content-Type: application/graphql

query {
    findBook(id: "book-1") { id name }
}
  • RSocket over WebSocket
### GraphQL over WebSocket
GRAPHQLWS localhost:8080/graphql
Content-Type: application/graphql

query {
    findBook(id: "book-1") { id name }
}
  • GraphQL over RSocket
### GraphQL over RSocket
GRAPHQLRS graphql
Host: ws://localhost:8080/rsocket
Content-Type: application/graphql

query {
    findBook(id: "book-1") { id name }
}

References

About

One controller to combine HTTP REST, GraphQL and RSocket

Topics

Resources

License

Stars

Watchers

Forks

Languages