-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ahead Of Time support #495
Comments
Hi @bclozel , I have meet another issue with opening GraphlQL websocket using webflux stack when I run native application. From my briftly analysis it looks like there is missing dependency or missing hint. I don't know where should I report an issue? Just here is enough, or maybe create another one? I have prepared simple repository where you can see full configuration of project and fell free to try yourself. Please find the link below: https://github.com/rafallezanko/spring_native_graphql_error_example/tree/master When I start application I receive No JSON Encoder exception from CodecDelegate class:
|
As can be seen in a modified version of the following example project, attempting to access a resource discovered via classpath scanning within a GraalVM native image -- for example via the Files.exists(...) invocation in FileSystemResource -- currently results in a ClosedFileSystemException since PathMatchingResourcePatternResolver explicitly closes the native image FileSystem that backs `resource:` resources. Sample project: https://github.com/joshlong/spring-boot-3-aot-graphql To address this issue, this commit removes the explicit close() invocation for custom FileSystems after classpath scanning in PathMatchingResourcePatternResolver. See spring-projects/spring-graphql#495 Closes gh-29397
@rafallezanko this issue is still opened, so GraalVM Native is not supported yet with Spring for GraphQL. |
This is now resolved, but actual support in Spring Boot applications requires:
|
Hi @bclozel, have you tried with enabled web socket in web flux project? Application could not be able to start when I add the following property I have attached error in my previous post in the issue. I have upgraded project to newest version of Spring and I have added metadata repository: |
Hi @bclozel, Can you provide aot support for graphql-java-extended-scalars and graphql-java-extended-validation? |
Thanks for reaching out @rafallezanko @susimsek I'll have a look and report back here. |
@rafallezanko I've reproduced the WebSocket+Native issue and created #560 to solve it. |
Hi @bclozel , good to know. Thank you a lot! |
Sorry for the late reply @susimsek I've had a look at |
@susimsek before I can add it to the repository, I need a failing test that shows the need for this entry. Any hint on how to reproduce this missing metadata? Do you have a stacktrace that shows what's doing the reflection? |
@bclozel line 71 of this class always returns null. Reflection is used in line 71. Since locale returns null, they always assigned the default locale on 35 lines.I noticed it while reviewing the github repo.i don't have a stacktrace. |
Hi @bclozel, is this issue with GraphQL fully fixed or is possible there is a regression? I'm using Spring Boot 3.1.3 together with Graalvm 22.3.1. Use GraphQL from client side app compiled in native, as indicated in docs (https://docs.spring.io/spring-graphql/reference/graalvm-native.html#graalvm.client) I included However still get a
All my tries to fix it were unsuccessful, I'm running out of ideas and no clue why still fails. |
Can you create a new issue and share a minimal sample? Maybe a reflection hint is missing, I can have a look. |
Since Spring Framework has been working on AOT and GraalVM Native Image support, we should consider improvements to make this work in time for 1.1.0.
Right now we're identifying several tasks:
BeanFactoryInitializationAotProcessor
in Spring for GraphQL that registersRuntimeHints
for controllers,@SchemaMapping
+@BatchMapping
methods, Java application types tied to the GraphQL schema and proxying support for@ProjectedPayload
support. This should be done as part if this issue.The text was updated successfully, but these errors were encountered: