starwars/

directory
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2022 License: MIT

README

StarWars API example

A bit actual usage, define as Go package, using google.protobuf.XXX package, run with docker container.

How to try

This example uses google's protobuf package, so you need to be able to import them:

# mac
brew install protobuf
# linux
follow specific package manager...

Build protoc to Go code, and start docker-compose:

make start

Then service and gateway containers are running:

  • service - localhost:50051
  • gateway - localhost:8888

Try to send GraphQL request:

curl -g "http://localhost:8888/graphql" -d '
{
  humans {
    id
    name
    friends {
      name
    }
  }
  hero(episode: JEDI) {
    name
  }
}'

Directories

Path Synopsis
app
spec

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL