example-graphql-grpc

module
v0.0.0-...-f49420d Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT

README

Get Started with dfuse graphQL API over gRPC

This simple programme demonstrates how easy it is to query our graphQL API over gRPC.

  • It uses our go client to retrieve a JWT that will then be used to create the gRPC credential.
  • Create a gRPC connection.
  • Instantiate a graphQL client.
  • Write a simple graphQL query
  • Execute the query and wait for response

Before you begin

Get the source code

  • git clone https://github.com/dfuse-io/example-graphql-grpc.git
  • git clone https://github.com/dfuse-io/graphql-over-grpc.git

Generates the graphql.pb.go

  • protoc -I graphql-over-grpc graphql/graphql.proto --go_out=plugins=grpc:./example-graphql-grpc

Getting project dependencies

  • cd example-graphql-grpc
  • go mod init main
  • go mod tidy

Run it!

ETHEREUM

  • go run ./eth YOUR_API_KEY_HERE

EOSIO

  • go run ./eos YOUR_API_KEY_HERE

Useful links

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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