Generates data fetcher interface for query types #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Java generator has an option to generate example data fetchers that can be copied into the codebase and extended as needed, but the kotlin generator has no such option.
This PR implements example data fetcher generator for kotlin with a twist: instead of generating a a class with TODO bodies, it generates an interface, for now.
This is the first in a series of PRs that would add an option similar to OpenAPI kotlin-spring generator
interfaceOnly
option.Interfaces generated by this way would only be usable if the example output directory is set to the generated code directory. However, the generated interfaces would not be useable until Netflix/dgs-framework#320 is resolved.
The final solution would enable the development of schemas in a separate repository. Automation would use this generator to generate data classes for types and interfaces for data fetchers and mutations that server component must implement. The generated sources would be packaged and published as a jar. in the final solution, this interface generation behavior would get it's own configuration option/flag.
The current PR introduce just enough change that would enable me to further experiment with code generation in small iterations without diverging much from the mainline.
edit: elaborates scope, links blocker PR in dsg-framework