Skip to content

OSGiServlet not working in an enRoute Setup #181

Closed
@Sandared

Description

@Sandared

Hi,

I tried to setup a minimal example on how to use your GraphQL Servlet in a pure enRoute OSGi setup. First I tried to merely include your library and then copy&paste the example code of your Karaf example in my own component.

Unfortunately this didn't work, as the OsgiGraphQLHttpServlet wasn't registered via the HttpWhiteboard.

I think this might stem from the component properties of OsgiGraphQLHttpServlet that are incorrect according to the standard. Instead of using alias=/graphql you should use either the new annotations like this @HttpWhiteboardServletPattern("/graphql") or use the old style property like this osgi.http.whiteboard.servlet.pattern=/graphql

I've created a small runnable example that you can inspect via Gitpod if you want: Open in Gitpod

Just cd in to /graphql , type resolve app and when maven is finished run app/target/debug.jar

Maybe you could change the properties accordingly so that the OsgiGraphQLHttpServlet is usable in a plain OSGi environment too.

Kind regards,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions