Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Latest commit

 

History

History
33 lines (25 loc) · 1 KB

README.md

File metadata and controls

33 lines (25 loc) · 1 KB

Microservices API sample repository

This is sample repository. I don't meintenance for working with the latest libraries.

OpenAPI 3

Go to This definition's Swagger Editor

gRPC usage

cd grpc
docker-compose build
./generate.sh

docker-compose up -d
docker-compose run client
# result: id = 1, description=description
# result: id = 2, description=

GraphQL usage

cd graphql
docker-compose build
docker-compose up -d

curl -X POST -d '{"query": "{  applications { id  description } player(id: 1) { name } }"}' -H "Content-Type: application/json" localhost:14567/graphql
# {"data":{"applications":[{"id":1,"description":null},{"id":2,"description":"id=2 application"}],"player":{"name":"Honoka"}}}
curl -X POST -d '{"query": "{  player(id: 2) { id name } }"}' -H "Content-Type: application/json" localhost:14567/graphql
{"data":{"player":{"id":2,"name":"Mari"}}}⏎