Skip to content

Bump graphql-java to 16.2, do not include external dependencies #564 #589 #611

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 6 commits into from
Mar 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ repositories {
}

dependencies {
implementation "org.freemarker:freemarker:2.3.31"
implementation "com.graphql-java:graphql-java:15.0"
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.1"
implementation "com.typesafe:config:1.4.1"
compileOnly "org.freemarker:freemarker:2.3.31"
compileOnly "com.graphql-java:graphql-java:16.2"
compileOnly "com.fasterxml.jackson.core:jackson-databind:2.12.1"
compileOnly "com.typesafe:config:1.4.1"

testImplementation "org.junit.jupiter:junit-jupiter-api:5.7.1"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.7.1"
Expand All @@ -46,6 +46,10 @@ task codeCoverageReport(type: JacocoReport) {
}
}

configurations {
testCompile.extendsFrom compileOnly
}

test {
testLogging {
events "failed"
Expand Down
6 changes: 3 additions & 3 deletions plugins/gradle/example-client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-web:2.4.4"
implementation "org.springframework.boot:spring-boot-starter-data-mongodb:2.4.4"

implementation "com.graphql-java-kickstart:graphql-spring-boot-starter:8.0.0"
implementation "com.graphql-java-kickstart:graphiql-spring-boot-starter:8.0.0"
implementation "com.graphql-java:graphql-java-extended-scalars:15.0.0"
implementation "com.graphql-java-kickstart:graphql-spring-boot-starter:11.0.0"
implementation "com.graphql-java-kickstart:graphiql-spring-boot-starter:11.0.0"
implementation "com.graphql-java:graphql-java-extended-scalars:16.0.0"

// use the latest available version:
// https://search.maven.org/artifact/io.github.kobylynskyi/graphql-java-codegen
Expand Down
6 changes: 3 additions & 3 deletions plugins/gradle/example-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ dependencies {
implementation "org.springframework.boot:spring-boot-starter-web:2.4.4"
implementation "org.springframework.boot:spring-boot-starter-data-mongodb:2.4.4"

implementation "com.graphql-java-kickstart:graphql-spring-boot-starter:8.0.0"
implementation "com.graphql-java-kickstart:graphiql-spring-boot-starter:8.0.0"
implementation "com.graphql-java:graphql-java-extended-scalars:15.0.0"
implementation "com.graphql-java-kickstart:graphql-spring-boot-starter:11.0.0"
implementation "com.graphql-java-kickstart:graphiql-spring-boot-starter:11.0.0"
implementation "com.graphql-java:graphql-java-extended-scalars:16.0.0"

implementation "javax.validation:validation-api:2.0.1.Final"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ dependencies {

implementation "io.github.kobylynskyi:graphql-java-codegen:${version}"

implementation "org.freemarker:freemarker:2.3.31"
implementation "com.graphql-java:graphql-java:16.2"
implementation "com.fasterxml.jackson.core:jackson-databind:2.12.1"
implementation "com.typesafe:config:1.4.1"

testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.1'
}
Expand Down
6 changes: 3 additions & 3 deletions plugins/maven/example-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -134,17 +134,17 @@
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-spring-boot-starter</artifactId>
<version>8.0.0</version>
<version>11.0.0</version>
</dependency>
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphiql-spring-boot-starter</artifactId>
<version>8.0.0</version>
<version>11.0.0</version>
</dependency>
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-scalars</artifactId>
<version>15.0.0</version>
<version>16.0.0</version>
</dependency>


Expand Down
6 changes: 3 additions & 3 deletions plugins/maven/example-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-spring-boot-starter</artifactId>
<version>8.0.0</version>
<version>11.0.0</version>
</dependency>
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphiql-spring-boot-starter</artifactId>
<version>8.0.0</version>
<version>11.0.0</version>
</dependency>
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-scalars</artifactId>
<version>15.0.0</version>
<version>16.0.0</version>
</dependency>

<dependency>
Expand Down
21 changes: 21 additions & 0 deletions plugins/maven/graphql-java-codegen-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,27 @@
<artifactId>graphql-java-codegen</artifactId>
<version>${version.graphql-java-codegen}</version>
</dependency>

<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.31</version>
</dependency>
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java</artifactId>
<version>16.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.4.1</version>
</dependency>
</dependencies>

<build>
Expand Down
6 changes: 5 additions & 1 deletion plugins/sbt/graphql-java-codegen-sbt-plugin/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ lazy val `graphql-codegen-sbt-plugin` = Project(id = "graphql-codegen-sbt-plugin
pushChanges
),
libraryDependencies ++= Seq(
"io.github.kobylynskyi" % "graphql-java-codegen" % (version in ThisBuild).value
"io.github.kobylynskyi" % "graphql-java-codegen" % (version in ThisBuild).value,
"org.freemarker" % "freemarker" % "2.3.31",
"com.graphql-java" % "graphql-java" % "16.2",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.12.1",
"com.typesafe" % "config" % "1.4.1"
),
buildInfoKeys := Seq[BuildInfoKey](name, version, sbtVersion, jValidationVersion),
buildInfoPackage := "io.github.dreamylost.graphql.codegen"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ libraryDependencies ++= Seq(
"com.squareup.okhttp3" % "okhttp" % "4.7.2",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.11.1",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.11.1",
"org.json" % "json" % "20190722")
"org.json" % "json" % "20190722",
"com.graphql-java" % "graphql-java" % "16.2")


enablePlugins(GraphQLCodegenPlugin)
Expand Down Expand Up @@ -57,4 +58,4 @@ generateCodegenTargetPath in GraphQLCodegenConfig := crossTarget.value / "src_m

generateEqualsAndHashCode := true

generateToString := true
generateToString := true
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ private String getReturnType(MappingContext mappingContext, ExtendedFieldDefinit
NamedDefinition namedDefinition, String parentTypeName) {
RelayConfig relayConfig = mappingContext.getRelayConfig();
if (relayConfig != null && relayConfig.getDirectiveName() != null) {
Directive connectionDirective = fieldDef.getDirective(relayConfig.getDirectiveName());
if (connectionDirective != null) {
Argument argument = connectionDirective.getArgument(relayConfig.getDirectiveArgumentName());
List<Directive> connectionDirective = fieldDef.getDirectives(relayConfig.getDirectiveName());
if (!connectionDirective.isEmpty()) {
Argument argument = connectionDirective.get(0).getArgument(relayConfig.getDirectiveArgumentName());
// as of now supporting only string value of directive argument
if (argument != null && argument.getValue() instanceof StringValue) {
String graphqlTypeName = ((StringValue) argument.getValue()).getValue();
Expand Down