tailcall icon indicating copy to clipboard operation
tailcall copied to clipboard

bug: generated gRPC configuration throws validation error ` expected type to be required `.

Open laststylebender14 opened this issue 6 months ago • 0 comments

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

  1. 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"
  }
}
  1. Run the generated config.

Technical Requirements

  • add unit test for the specific test case

laststylebender14 avatar Aug 09 '24 11:08 laststylebender14