Replies: 8 comments 1 reply
-
It should work, as we use it in some of our test cases. Maybe have a look there ? What error do you get? |
Beta Was this translation helpful? Give feedback.
-
See https://github.com/smallrye/smallrye-graphql/blob/main/server/integration-tests/pom.xml#L68 for example You can also look at how it's used in the runner project that use wildfly |
Beta Was this translation helpful? Give feedback.
-
https://github.com/smallrye/smallrye-graphql/tree/main/server%2Frunner |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick answer.
I'll look at the code, I guess it is something wrong with my dependencies. I will compare your code working code with mine.
This is the response inside the graphql-ui: |
Beta Was this translation helpful? Give feedback.
-
Seem like you are missing CDI |
Beta Was this translation helpful? Give feedback.
-
I have tried different things to get CDI working, at least the console logs shows:
and a small test servlet with and @Inject annotation works. But the inject ExecutionService in the ExecutionServlet is still null. My upateded project can be found here https://github.com/Malte-Neu/graphql-servlet-test/tree/weld_v3 |
Beta Was this translation helpful? Give feedback.
-
Hi @Malte-Neu . I would love to help you more, but I do not have time to spend on this now. Running in Embedded Jetty is not a priority for us. However, we will gladly accept a PR if needed to make it work for you. If you look at the pom.xml: https://github.com/smallrye/smallrye-graphql/blob/1.6.x/server/implementation-servlet/pom.xml I also ran your example, and it seems like the StartupListener (https://github.com/smallrye/smallrye-graphql/blob/1.6.x/server/implementation-servlet/src/main/java/io/smallrye/graphql/entry/http/StartupListener.java) is not running on Startup. That listener initialize everything, so it should run. You will see things in the log one it run. It bootstrap the graphql-java, using Jandex to find all GraphQL annotations and build the model, and map that to graphql-java and make the schema available. Happy to debug more with you if you manage to proceed and get the listener to run. |
Beta Was this translation helpful? Give feedback.
-
@Malte-Neu - i transferred the issue to a discussion. If you find any issues while trying to get this work, you are welcome to add issues. |
Beta Was this translation helpful? Give feedback.
-
I want to add graphql functionality to my existing embedded jetty project. I found the the graphql servlet, but I can't get it running in my example. The schema generation does not work an the ui schows returns only an error.
Here you can find my test project: https://github.com/Malte-Neu/graphql-servlet-test
I also asked this question a few days ago on stackoverflow (https://stackoverflow.com/questions/72827545), because no one writes an answer I try it here. I hope someone here can show me the way to get it working.
Beta Was this translation helpful? Give feedback.
All reactions