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
graphql-maven-plugin unable to create scalar for custom class #198
Comments
Hello, Thank you for the detailed analysis. I'm still surprised that I didn't encounter this in all the existing integration tests. Of course, I'll delivered that. In the meanwhile, can you check the workaround that I suggested in the #184 ? Etienne |
Hi, Thank you for your response. Unfortunately, the workaround you mentioned does not work for me. The scalar classes (e.g. For it to work in my case, the plugin would have to add all classes from the `src/main/java' directory to the classpath. This is not a perfect approach, however, as it gets very complicated when it comes to implementing support for multi-module Maven projects. I have to wait for the fix to be released. Cheers |
Hello, The correction for this issue has been released the 2.3 version. |
Correction available in 2.3 and 1.18.12 versions. |
Hey,
we are using graphql-maven-plugin 1.x to generate java model classes from graphqls files.
We have custom scalars defined with our custom classes, e.g.:
and the java class which backs the scalar is:
Unfortunately the generation of the java classes stopped working for us when version
1.18.10
was released. The reason for this is this commit: cb0ad28b#diff-ddaf51417f6600ca7ae82284e8c0b25bded77c66552242f6083382fad4325ee2 and the change to thecom.graphql_java_generator.util.GraphqlUtils#getPackageName
method. The reason the generation does not work any more is because theClass<?> cls = Class.forName(classFullName);
code fromcom.graphql_java_generator.util.GraphqlUtils#getPackageName
is not able to loadCustomerId
class from the project (theCustomerId
class is not a JDK class).If the current code:
gets replaced with:
then the class generation with my custom scalars gets fixed.
Could you please apply this change to both 1.x and 2.x versions of the plugin?
Thanks
The text was updated successfully, but these errors were encountered: