99designs / gqlgen

go generate based graphql server library
https://gqlgen.com
MIT License
9.88k stars 1.15k forks source link

gqlgen and gRPC #372

Closed rislah closed 5 years ago

rislah commented 5 years ago

how do I use the protobuf generated struct? It throws a panic if I try to generate the files and it says "cannot find package". If I cd into the paths it shows in the panic, everything is ok. Protobuf generated file is there in package "hello" and the struct is named "Hello" however it cant find it

models:
  Hello:
    model: github.com/GoingFast/1/hello.Hello
sachaarbonel commented 5 years ago

I found a blog article about gqlgen and grpc if it can help

ghost commented 5 years ago

Its a needed feature that has been on the roadmap for a while. Seem liek it will get put in for 0.9 ?

This stub has been there waiting :) https://github.com/99designs/gqlgen/blob/master/codegen/data.go#L13

Also there is a huge amount of effort for getting GraphQL resolvers to GPRC and Rest working with Envoy. https://github.com/solo-io/gloo Envoy is loaded with your graphql schema and then just knows which GRPC endpoints to resolve with.

This is the only way to do composition of systems if you ask me. In fact graphl-ql is so similar to cars. You just put it on top of your GRPC stuff and configure it.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.