Description
Now that spring-graphql is 1.0 and reasonably stable, it would be good to provide first class support for their structures.
Currently @QueryMapping, @MutationMapping and @SubscriptionMapping can be shoe-horned in via customAnnotationsMapping with something like:
"customAnnotationsMapping": {
"^Query\\.\\w+$": ["org.springframework.graphql.data.method.annotation.QueryMapping"],
"^Mutation\\.\\w+$": ["org.springframework.graphql.data.method.annotation.MutationMapping"],
"^Subscription\\.\\w+$": ["org.springframework.graphql.data.method.annotation.SubscriptionMapping"]
}
But that falls short on parameterised resolvers, or resolvers for extensions which are generated separately which rely on spring's @SchemaMapping(typeName = "MyGraphQLType")
(and so need to be manually added)
Likewise use of @Argument
for all input parameters can be manually added to the implementing classes, but would be convenient to have on the generated interfaces.
There are other parameter types that can be provided (see https://docs.spring.io/spring-graphql/docs/current/reference/html/#controllers). Adding these with similar configuration as exists today for DataFetchingEnvironment would also be useful and would provide reasonably complete with what spring-graphql offers.
Also note that there is a feature request in spring-graphql for code generation: spring-projects/spring-graphql#159 which would effectively be solved with this functionality.