protoc-gen-twirpql icon indicating copy to clipboard operation
protoc-gen-twirpql copied to clipboard

Generates invalid graphql for oneof types

Open tmc opened this issue 5 years ago • 1 comments

message OneOf {
  message Value {
    oneof value {
      string string_value = 1;
      int64 int_value = 2;
    }
  }
}

generates

input OneOf {
}

tmc avatar Sep 19 '19 21:09 tmc

@tmc does it work if you just do the following:

message Value {
    oneof value {
      string string_value = 1;
      int64 int_value = 2;
    }
}

I say this because this is potentially because Value is an embedded message for OneOf. I haven't explicitly added support for embedded types but I plan on doing so. I'm busy for the next month or so but happy to take PRs if you or anyone wants to give it a shot.

marwan-at-work avatar Oct 07 '19 21:10 marwan-at-work