Open hyrefeldt-ourstudio opened 2 years ago
I have the same issue but you were on the right track spoting its root cause!
Seems @Yamashou fixed it in clientgenv2 (Yamashou/gqlgenc@7c74e5d7739df1e579d80261f30e928cdb242a3c) but not in clientgen.
The following patch fixes it for clientgen:
diff --git a/clientgen/template.go b/clientgen/template.go
index 8a8017e..89ffa89 100644
--- a/clientgen/template.go
+++ b/clientgen/template.go
@@ -19,7 +19,7 @@ func RenderTemplate(cfg *config.Config, query *Query, mutation *Mutation, fragme
"Operation": operations,
"OperationResponse": operationResponses,
"GenerateClient": generateCfg.ShouldGenerateClient(),
- "ClientInterfaceName": generateCfg.ClientInterfaceName,
+ "ClientInterfaceName": generateCfg.GetClientInterfaceName(),
},
Packages: cfg.Packages,
PackageDoc: "// Code generated by github.com/Yamashou/gqlgenc, DO NOT EDIT.\n",
@hyrefeldt-ourstudio
Do you have to use v1 clients? If so, I will try to correct v1 as well as v2
I get this error which looks like an error caused by some missing config
I'm using go1.18 so I have installed the executable
gqlgenc
viago install github.com/Yamashou/gqlgenc
sincego get
doesn't install executables in go1.18. Prior to that I did rungo get -u github.com/Yamashou/gqlgenc
. The.gqlgenc.yml
that i use looks likeWhat happens that the models in
graphql-service_gen.go
does seem to be generated correctly. And I have not done any changes to the queries in./internal/backend/graphql/graphql-service/query
so I don't expect any changes in./internal/backend/graphql-service.go
. But since I get the error above I want to double check that I'm not missing some important config.