Autobind not working #2230
Unanswered
itsNotMyUsername
asked this question in
Q&A
Replies: 2 comments 2 replies
-
Please, do not open the same issue again. Autobind works. Read docs carefully or wait if someone can help you. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Apologies, it didnt look like the same issue. Initially I thought its only related to private repos but looks like it doesnt work for me with public repo either. What am I missing from docs https://gqlgen.com/config/ under autobind section that I missed to do?
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What happened?
I copied
Message
type from https://github.com/99designs/gqlgen/blob/master/codegen/config/testdata/autobinding/chat/message.go to my public temporary repository https://github.com/itsNotMyUsername/example/blob/main/chat/message.goPassing the url to autobind:
results in
generating core failed: unable to load github.com/itsNotMyUsername/example/chat - make sure you're using an import path to a package that exists
.If I pass url to autobind to original model like so:
all works as expected, types are reused and imported in generated resolver from above url.
What am I missing that autobinds is not working for my repo with same model?
What did you expect?
The model to be reused and no error thrown.
Minimal graphql.schema and models to reproduce
versions
go run github.com/99designs/gqlgen version
? v0.17.9go version
? go1.18.1Beta Was this translation helpful? Give feedback.
All reactions