-
Couldn't load subscription status.
- Fork 330
Description
The default spring boot configuration expose only one endpoint. To expose multiple endpoints (like a "public" one and an "admin" one), the auto configuration has to be disabled and the configuration has to be written accordingly. There are sample of such setup, like this one https://github.com/codesnippe/multiple-graphql-endpoints-demo. So far so good, this is totally fine with me.
There is still an issue with such a setup: the AnnotatedControllerConfigurer is still global. When defining a @QueryMapping, there is no guarantee that this endpoint will end up serving a particular schema over the other.
So I went to redefine my own AnnotatedControllerConfigurer which is instanciated twice, one for my "public" schema and my annotation @PublicGQLController, and one for my "admin" schema and my annotation @AdminGQLController.
This issue is that is not very practical to redefine a AnnotatedControllerConfigurer just to change the annotation being looked up. Due to the private functions and classes used in this class, a lot of code has to be duplicated.
Thus, is would be nice if the class AnnotatedControllerConfigurer could allow the configuration of a custom annotation.