Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gqlgen Autobind internal package - unable to find type #911

Closed
ihgann opened this issue Oct 25, 2019 · 7 comments
Closed

gqlgen Autobind internal package - unable to find type #911

ihgann opened this issue Oct 25, 2019 · 7 comments
Labels
bug Something isn't working stale

Comments

@ihgann
Copy link

ihgann commented Oct 25, 2019

What happened?

Tried to resolve an autobind in an internal path:

autobind:
  - github.com/ihgann/app/internal/models
models:
  Todo:
    model: models.Todo
> go run github.com/99designs/gqlgen -v
panic: unable to find type models.Todo

What did you expect?

It should still be able to find the path.

Minimal graphql.schema and models to reproduce

From examples.

versions

  • gqlgen version? v0.10.1
  • go version? 1.12.9 darwin/amd64
  • dep or go modules? go modules

A note. I don't know if this is necessarily expected to work, as I'm unsure how gqlgen is actually determining packages. If it only works with exported packages, then I suppose this makes sense. However, perhaps it should be documented?

@stale
Copy link

stale bot commented Dec 24, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 24, 2019
@ihgann
Copy link
Author

ihgann commented Dec 24, 2019

Bumping to keep from becoming stale.

@stale stale bot removed the stale label Dec 24, 2019
@vvakame vvakame added the bug Something isn't working label Dec 25, 2019
@stale
Copy link

stale bot commented Feb 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 23, 2020
@stale stale bot closed this as completed Mar 1, 2020
@flowchartsman
Copy link

This should not be stale. I am encountering a similar issue with autobinding to models in the root of a module

@ihgann
Copy link
Author

ihgann commented Jan 26, 2021

Yeah, agreed. I wish it could be re-opened. @vvakame is this possible to re-open?

@Igorpollo
Copy link

Someone found a solution? same here

@JamesArthurHolland
Copy link

JamesArthurHolland commented Aug 17, 2023

The internal folder doesn't get packaged by the go compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

5 participants