Skip to content
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

Schema files under relative symbolic soft link directory are not recognizable #1271

Open
myatmin opened this issue Jul 20, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@myatmin
Copy link

myatmin commented Jul 20, 2023

Issue Description

Files under relative symbolic soft link directory are not recognizable using graphqlSchemas configuration

Steps to Reproduce

  • Create relative symbolic soft link directory in ~/src/main/resources (Example: ln -s ../../../foo/bar graphql)

Expected Result

To generate code files.

Actual Result

[ERROR] 
java.lang.IllegalArgumentException: Either graphql schema path or introspection result path should be supplied
    at com.kobylynskyi.graphql.codegen.GraphQLCodegen.generate (GraphQLCodegen.java:158)
    at io.github.kobylynskyi.graphql.codegen.GraphQLCodegenMojo.execute (GraphQLCodegenMojo.java:321)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:370)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:351)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:171)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:163)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:294)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:960)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:568)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Your Environment and Setup

  • Debian GNU/Linux 11 (bullseye)
  • OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
  • graphql-java-codegen version: 5.7.2
  • Build tool: Maven
<configuration>
    <graphqlSchemas>
        <rootDir>${project.basedir}/src/main/resources/graphql</rootDir>
        <recursive>true</recursive>
        <includePattern>.*\.graphqls</includePattern>
    </graphqlSchemas>
    <outputDir>${project.build.directory}/generated-sources/graphql</outputDir>
    <packageName>com.foo.bar.graphql</packageName>
    <apiPackageName>com.foo.bar.graphql.api</apiPackageName>
    <modelPackageName>com.foo.bar.graphql.model</modelPackageName>
    <generatedAnnotation>jakarta.annotation.Generated</generatedAnnotation>
    <customTypesMapping>
        <Uuid>java.util.UUID</Uuid>
        <DateTime>java.time.OffsetDateTime</DateTime>
        <Date>java.time.LocalDate</Date>
        <Time>java.time.LocalTime</Time>
    </customTypesMapping>
    <customAnnotationsMapping>
        <EpochMillis>
            <annotation>com.fasterxml.jackson.databind.annotation.JsonDeserialize(using = com.example.json.EpochMillisScalarDeserializer.class)</annotation>
        </EpochMillis>
    </customAnnotationsMapping>
</configuration>
@myatmin myatmin added the bug Something isn't working label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant