Closed dvic closed 6 years ago
By the way, I think https://github.com/vektah/gqlgen also has the same issue, I guess we should also fix it there?
Thanks for this, yeah theres an open issue for the gqlgen side but its going to be a bit more complicated because there are some circular data requirements https://github.com/vektah/gqlgen/issues/114.
This PR changes how the output package name is chosen. Instead of using the base path, it first checks if there is a go file in the working directory and uses that package name. In this way, the generated file will contain the correct package name if it is different than the base path (which is allowed in Go).