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 providing additional custom imports #1414

Open
FyiurAmron opened this issue Nov 27, 2023 · 0 comments
Open

allow providing additional custom imports #1414

FyiurAmron opened this issue Nov 27, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@FyiurAmron
Copy link

FyiurAmron commented Nov 27, 2023

Is your feature request related to a problem? Please describe.
Making a complete GraphQL app across separate schema files and modules is now tricky. Each type that is used externally needs to be manually remapped, which is extremely tedious, produces tons of boilerplate and is fault-prone for large integrations.

Describe the solution you'd like
Allowing adding imports to codegen files via e.g. extending the already existing DataModelMapper.getImports() to not start with empty HashMap but to populate it from a config var would make this trivial. It could be named e.g. just imports or additionalImports,

Describe alternatives you've considered
Injecting that text via other setting, e.g. generatedAnnotation - impossible due to leading @ and extremely hackish anyway.

@FyiurAmron FyiurAmron changed the title allow providing custom imports allow providing additional custom imports Nov 27, 2023
@jxnu-liguobin jxnu-liguobin added the enhancement New feature or request label Nov 28, 2023
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

No branches or pull requests

2 participants