spring support for graphQl schema generator#33
spring support for graphQl schema generator#33PeretzNadav wants to merge 6 commits intoDistelli:masterfrom PeretzNadav:spring-support
Conversation
create Configuration class for all relavant class - add to stg spring support - add parameter springModuleName - turn protected TypeProvider constructor to public - masked injector code from posts project
fix - masked injector code from posts project
fix 2 - masked injector code from posts project
|
create Configuration class for all relavant class
|
- masked injector code from posts project
brimworks
left a comment
There was a problem hiding this comment.
I really appreciate the PR! Overall, this looks like a great improvement.
| <maven>3.0</maven> | ||
| </prerequisites> | ||
|
|
||
| <groupId>com.distelli.graphql</groupId> |
There was a problem hiding this comment.
Does the groupId get inherited from the parent?
| content); | ||
| } else if (springModuleName != null && stGroup.isDefined("springModule") ) { | ||
| PackageClassName packageClassName = getPackageClassName(springModuleName); | ||
| final String body = " /*\n" + |
There was a problem hiding this comment.
Can't we simply put this in the string template file?
| import graphql.language.TypeName; | ||
| import graphql.language.UnionTypeDefinition; | ||
| import graphql.language.Value; | ||
| import graphql.language.*; |
There was a problem hiding this comment.
Perhaps your editor did this, but I'd prefer to avoid star imports :).
| .name("<it.name>") | ||
| <if(it.defaultValue)> | ||
| .defaultValue(<it.defaultValue>) | ||
| .defaultValue(<if(it.isStringValue)>"<it.defaultValue>"<else><it.defaultValue><endif>) |
There was a problem hiding this comment.
We should really fix the STModel so that <it.defaultValue> properly escapes as a string or number... specifically, if the default value is a string with a double quote, it won't generate correct code.
| <if(model.idField)> | ||
| @Bean | ||
| public <model.packageName>.<model.name>.Resolver _<model.name>Resolver(){ | ||
| return list -> list; |
There was a problem hiding this comment.
Maybe Function.identity()?
https://docs.oracle.com/javase/8/docs/api/java/util/function/Function.html#identity--
create Configuration class for all relavant class