tailcall
tailcall copied to clipboard
bug: generated gRPC configuration throws validation error ` expected type to be required `.
Describe the bug
Generated config from gRPC throws following validation error. error:
ERROR Invalid Configuration
Caused by:
• expected type to be required [at [email protected]__NewsList.news]
Above issue occurs due to following lines.
# we say `news__NewsList` is required but it's internals aren't required.
news__NewsService__GetAllNews: news__NewsList! @grpc(method: "news.NewsService.GetAllNews")
type news__NewsList @tag(id: "news.NewsList") {
news: [news__News]
}
Steps to reproduce
- use following configuration to generate the tailcall config. path for news.proto: https://github.com/tailcallhq/tailcall/blob/main/tailcall-fixtures/fixtures/protobuf/news.proto
{
"inputs": [
{
"proto": {
"src": "../protobuf/news.proto"
}
}
],
"output": {
"path": "./output.graphql",
"format": "graphQL"
},
"schema": {
"query": "Query"
}
}
- Run the generated config.
Technical Requirements
- add unit test for the specific test case