Friday, June 23, 2017

Is there a way to generate a GraphQL schema from a protobuf?

Leave a Comment

I have a rather large/complex protobuf definition of an API, and I wonder if there's a convenient tool to automatically generate a GraphQL schema and its (nested) types from a subset of this protobuf?

I'm using Node.js normally, but I'm open for other languages to generate the schema. Thanks in advance!

1 Answers

Answers 1

If you're willing to use GoLang, there's a protobuf to GraphQL converter at

https://github.com/opsee/protobuf

Current gadgets graphql

The graphql gadget will generate a graphql schema for protobuf messages for use with the go-graphql package. It defines extensions for use in files, messages, and fields. See examples for usage -- the files generated by the plugin are flavortown.pb.go and flavortownpb_test.go.

If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment