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
Through some testing in the buf-tour repo, it was found that when multiple .proto files are used to build up the entirety of a package, it results in a generated <file_prefix>.graphql.go file for each .proto file with the exact same contents within.
It seems that what is happening is that all dependencies are provided to the plugin when generating one of the packages, including remote dependencies and sibling files. This is all well and good for the actual generation because both of the resulting files do have all the needed types/function/queries/mutations that would result if the contents of both were combined into a single .proto file.
The outcome of this ticket has two possibilities:
The generation is resolved that only one file is generated
The drawback and potential snag is deciding which file to use as the final file name for the single generated file (could be easy, could be difficult, only time will tell).
This solution would likely be easier because the entirety of the graphql generation is present in both files, so you'd just need to limit the generation to outputting the one file.
Generation is changed to continue generating a respective file for each .proto input with the correct types/functions/queries/mutations housed within the respective named file
This is the pattern that the go generator uses
This will likely be a tad more difficult because you'll need to determine which things go in which file
I kinda prefer this as the outcome due to the result having a respective output file for each input .proto file.
The text was updated successfully, but these errors were encountered:
Through some testing in the buf-tour repo, it was found that when multiple
.proto
files are used to build up the entirety of a package, it results in a generated<file_prefix>.graphql.go
file for each.proto
file with the exact same contents within.It seems that what is happening is that all dependencies are provided to the plugin when generating one of the packages, including remote dependencies and sibling files. This is all well and good for the actual generation because both of the resulting files do have all the needed types/function/queries/mutations that would result if the contents of both were combined into a single
.proto
file.The outcome of this ticket has two possibilities:
.proto
input with the correct types/functions/queries/mutations housed within the respective named file.proto
file.The text was updated successfully, but these errors were encountered: