Skip to content

dbaggett/medallion

Repository files navigation

A contrived Olympic Games example to demonstrate the aggregation of gRPC enabled web-services into a GraphQL middleware.

Each service corresponds to a resource out of this Olympics API. The types and fields in the graph may differ from this spec as it was simply used for inspiration and reference. The data produced by each service does not represent actual Olympic facts.

Features

  • Microservice design
  • gRPC for inter-process communication
  • GraphQL api for data aggregation from each service
  • Rejoiner used to generate aggregated GraphQL schema from proto's and gRPC clients

How to run

Locally

Start each gRPC service

Each service must be running before starting the GraphQL server.

./gradlew ws-athletes:run
./gradlew ws-countries:run
./gradlew ws-events:run
./gradlew ws-medals:run
./gradlew ws-olympics:run

Start GraphQL server

./gradlew graphql-api:run

Querying the GraphQL server

A GraphiQL instance is available at http://localhost:8080.

Introspection

Run this introspection query to learn about supported types and their fields manually.

If you're using an apollo client, apollo-codegen can be used to generate the required schema file.

Http Examples

Post to http://localhost:8080/graphql

Olympics

{"query":"query Olympics {olympics {id city host year season}}","variables":null,"operationName":"Olympics"}

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors