Closed
Description
Im trying to register a GraphQLServletListener so i can set some headers on the response. When i register a listener in OSGI, the following code should pick it up and add it to the configuration:
OsgiGraphQLHttpServlet.java
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC)
public void bindServletListener(GraphQLServletListener listener) {
this.addListener(listener);
}
which then calls:
AbstractGraphQLHttpServlet
public void addListener(GraphQLServletListener servletListener) {
configuration.add(servletListener);
}
However, the configuration field is not initialised yet until the servlet gets registered. So an NPE is thrown.
graphql-java version: 11.0
graphql-java-servlet version: 7.3.3