smallrye-graphql
smallrye-graphql copied to clipboard
Gradle Plugin doesn't work and documentation is out of date
Referencing: https://smallrye.io/smallrye-graphql/2.5.0/gradle-plugin/
plugins {
id 'io.smallrye.graphql' version '1.0.2-SNAPSHOT'
}
This version is not present in any maven repo, and should be updated.
Additionally, following the documentation by adding:
id 'io.smallrye.graphql' version '2.5.0'
and a task:
generateSchema {
dependsOn 'compileKotlin'
destination = null
includeTransitiveDependencies = false
includeScalars = true
}
This results in a failure.
Execution failed for task ':generateSchema'.
> Could not resolve all dependencies for configuration ':implementationCopy'.
> Could not find io.quarkus:quarkus-oidc:.
Required by:
project :
> Could not find io.quarkus:quarkus-smallrye-jwt:.
Required by:
project :
{... More issues with imports}
It's my understanding that this shouldn't be an issue if it's depending on the compileKotlin
step.
Please let me know if i'm doing something wrong or if there's a different plugin/possibility for generating the GraphQL Schema at build time.
I just found that I needed to set includeTransitiveDependencies
to true
. Otherwise, the versioning in the docs are still a problem.
Hi, I've submitted https://github.com/smallrye/smallrye-graphql/pull/1958 for the version in the docs.... Yeah it would be better to have the version somehow automatically updated, but our release scripts currently don't have a way to automatically update variables in the documentation..
If it's possible to add a small blurb about what each of those options do? I originally turned off the transitiveDependencies thinking I didn't want to scan every third party library included in the project, but for something like Quarkus, it appears to be necessary since the GraphQL implementations are all hidden away behind that framework.
Yeah I think includeTransitiveDependencies
actually should not be necessary unless your GraphQL API uses some stuff from your dependencies. If you have to add it always, then something is wrong in the Gradle plugin. I think the Maven plugin works properly. I can try to dig into it later this week