Skip to content

timburks/graphql-showcase

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Showcase

A GraphQL wrapper for (parts of) the GAPIC Showcase API.

This project contains a simple and rough wrapper for a few methods of the GAPIC Showcase API, and is intended to provide an example of manual integration of a gRPC API into a GraphQL service.

It uses the graphql-go package.

This repository is temporary. This code is published to support the workshop Implementing OpenAPI and GraphQL Services with gRPC at the 2019 API Specifications Conference. It is intended for submission later into an experimental subdirectory of GAPIC Showcase.

Credits

Contents of the static directory are manually vendored from github.com/graphql/graphiql.

Installation

go get github.com/timburks/graphql-showcase

Invocation

Just run the graphql-showcase program. It currently takes no options and expects a GAPIC Showcase server to be running locally on port 7469 (the default).

Usage

After you've started the graphql-showcase server, visit http://localhost:8080 to open the GraphiQL browser. Then use standard GraphQL to explore the schema and make queries. For example, to create a new user, enter:

mutation {
  createUser(display_name:"me", email:"me@example.com") {
    id
    display_name
    email
  }
}

To see a list of users, enter:

{
  users {
    id
    display_name
    email
  }
}

To delete a user, enter:

mutation {
  deleteUser(id:"users/10") {
    id
  }
}

Go Version Supported

This code was developed with Go 1.12.

Disclaimer

This is not an official Google product.

About

An experimental GraphQL wrapper of the GAPIC Showcase API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages