tailcall
tailcall copied to clipboard
bug(grpc): incorrect type names for nested messages
Describe the bug
Type names generated for nested messages with the gen
command are incorrect. Consider the following example:
message News {
int32 id = 1;
string title = 2;
string body = 3;
string postImage = 4;
Status foo = 5;
message Author { // nested field
string name = 1;
string email = 2;
}
Author author = 6;
}
Expected behavior
The generated types should look like the following
input NEWS_NEWS @tag(id: "news.News") {
author: NEWS_NEWS_AUTHOR
body: String
foo: NEWS_STATUS
id: Int
post_image: String
title: String
}
input NEWS_NEWS_AUTHOR @tag(id: "news.News.Author") {
email: String
name: String
}
NOTE: In
NEWS_NEWS_AUTHOR
the firstNEWS
signifies thenews
package and the secondNEWS
signifies that the type is defined inside theNews
message.
Actual behavior
Currently, the following types are generated
input NEWS_NEWS @tag(id: "news.News") {
author: NEWS_AUTHOR
body: String
foo: NEWS_STATUS
id: Int
post_image: String
title: String
}
input NEWS_AUTHOR @tag(id: "news.Author") {
email: String
name: String
}