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

Gradle Plugin doesn't work and documentation is out of date #1957

Open
ericschmar opened this issue Nov 9, 2023 · 4 comments
Open

Gradle Plugin doesn't work and documentation is out of date #1957

ericschmar opened this issue Nov 9, 2023 · 4 comments

Comments

@ericschmar
Copy link

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.

@ericschmar
Copy link
Author

I just found that I needed to set includeTransitiveDependencies to true. Otherwise, the versioning in the docs are still a problem.

@jmartisk
Copy link
Member

Hi, I've submitted #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..

@ericschmar
Copy link
Author

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.

@jmartisk
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants