graphql-gradle-plugin is a Gradle Plugin for GraphQL, based on graphql-java. It accelerates the development for both the client and the server, by generating the Java code. It allows a quicker development when in contract-first approach, by avoiding to code the boilerplate code.
And that completes successfully. But I might just want to use the POJOs because I can't introduce Spring as a dependency to the project I'm working on.
But, when I try to run:
gradle generatePojo
I get an error:
> Task :generatePojo FAILED
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'addRelayConnections': Unsatisfied dependency expressed through field 'documentParser'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'generateCodeDocumentParser': Unsatisfied dependency expressed through field 'configuration'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.graphql_java_generator.plugin.conf.CommonConfiguration' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generatePojo'.
> Error creating bean with name 'addRelayConnections': Unsatisfied dependency expressed through field 'documentParser'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'generateCodeDocumentParser': Unsatisfied dependency expressed through field 'configuration'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.graphql_java_generator.plugin.conf.CommonConfiguration' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
I can run:
And that completes successfully. But I might just want to use the POJOs because I can't introduce Spring as a dependency to the project I'm working on.
But, when I try to run:
I get an error: