You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use this library to autobind my base types but I don't use the resolvers at all, I use gqlgen for that. I still would like to use both go, go-grpc, gogql and gpl.
There are some issues I run into that could be solved:
Graphql "type Ship implements Node" Issue: I would like to extend my proto types but it's not possible. Solution: a message option could be made like this: message Ship { option (danielvladco.protobuf.graphql.message) = {implements: "Node"}; string id = 1; } Expected:
The gogql outputs: type Node interface { IsNode() } func (*Ship) IsNode() {}
The gpl outputs following graphql: type Ship implements Node {} Considerations: if node was a type / message Node {} then it would be a struct generated by go/go-grpc that would collide with a possilbe interface Node {}. Another question is how and where the Node definition should be, perhaps there is a nested option structure that can be applied as a file option?.
gql generator, generates "dummy" query for "definition" proto files that contain only types (message Ship, etc.). Issue: If I only want types to be generated in the .graphql, it's not possible right now. It only output types that are traversed from a service then method and then field. There is a svc=false config that only applies to the directive.
change the type of id to ID. Issue: Creating a custom type creates a nested like structure in proto which is not ideal. Solution: a field option that changes the type of graphql. string id = 1 [(danielvladco.protobuf.graphql.field) = {required: true, type: "ID"}];
Expected:
The gpl outputs following graphql: type Ship { id: ID! }
The text was updated successfully, but these errors were encountered:
Hello! Thanks for a great library!
I'm looking to create a front facing 99design/gqlgen server that interacts with my internal grpc service. I'm looking to create a graphql server to fulfill https://graphql.org/learn/global-object-identification/ (GOI)
I use this library to autobind my base types but I don't use the resolvers at all, I use gqlgen for that. I still would like to use both go, go-grpc, gogql and gpl.
The graphql schema I'm trying to replicate can be found here: https://relay.dev/docs/guides/graphql-server-specification/
There are some issues I run into that could be solved:
Graphql "type Ship implements Node"
Issue: I would like to extend my proto types but it's not possible.
Solution: a message option could be made like this:
message Ship {
option (danielvladco.protobuf.graphql.message) = {implements: "Node"};
string id = 1;
}
Expected:
The gogql outputs: type Node interface { IsNode() } func (*Ship) IsNode() {}
The gpl outputs following graphql: type Ship implements Node {}
Considerations: if node was a type / message Node {} then it would be a struct generated by go/go-grpc that would collide with a possilbe interface Node {}. Another question is how and where the Node definition should be, perhaps there is a nested option structure that can be applied as a file option?.
gql generator, generates "dummy" query for "definition" proto files that contain only types (message Ship, etc.).
Issue: If I only want types to be generated in the .graphql, it's not possible right now. It only output types that are traversed from a service then method and then field. There is a svc=false config that only applies to the directive.
change the type of id to ID.
Issue: Creating a custom type creates a nested like structure in proto which is not ideal.
Solution: a field option that changes the type of graphql.
string id = 1 [(danielvladco.protobuf.graphql.field) = {required: true, type: "ID"}];
Expected:
The gpl outputs following graphql: type Ship { id: ID! }
The text was updated successfully, but these errors were encountered: