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

Allow specifying a path prefix for models #778

Closed
leebenson opened this issue Jul 7, 2019 · 1 comment · Fixed by #872
Closed

Allow specifying a path prefix for models #778

leebenson opened this issue Jul 7, 2019 · 1 comment · Fixed by #872
Labels
enhancement New feature or request

Comments

@leebenson
Copy link

leebenson commented Jul 7, 2019

Proposal:

autobind is a great addition, but I have models that don't always match the type name 1:1.

It'd be useful to augment autobind with a path prefix, which could then be used as a starting point to find a model using the regular <package>.<model> designation, e.g.

autobind:
  - github.com/some/custom/pkg/path/here

models:
  SomeCustomType:
    model: somePackage.CustomType

Ultimately, my goal is to move this config to schema files and avoid hard-coding absolute package paths for each definition / repeating the same prefix:

type SomeCustomType @goModel(model:"somePackage.CustomType") {
  ...
}
@vektah vektah added the enhancement New feature or request label Jul 8, 2019
@stale
Copy link

stale bot commented Sep 6, 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 Sep 6, 2019
@stale stale bot closed this as completed Sep 13, 2019
@vektah vektah removed the stale label Sep 22, 2019
@vektah vektah reopened this Sep 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants