Skip to content

Commit ff2778d

Browse files
smyrickdariuszkuc
authored andcommitted
Update library versions (#164)
Also add some very small changes that I have in my subscriptions branch that have no affect on behavior
1 parent c60101b commit ff2778d

File tree

10 files changed

+52
-47
lines changed

10 files changed

+52
-47
lines changed

detekt.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# turn on ALL checks
2-
failFast: true
3-
41
build:
52
weights:
63
comments: 0 # missing comments should not fail the build

example/pom.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,12 @@
6161
<properties>
6262
<!-- Project versions -->
6363
<java.version>1.8</java.version>
64-
<kotlin.version>1.3.11</kotlin.version>
64+
<kotlin.version>1.3.21</kotlin.version>
6565

6666
<!-- Dependency Versions -->
67-
<graphiql.version>5.0.2</graphiql.version>
6867
<graphql-kotlin.version>0.2.1-SNAPSHOT</graphql-kotlin.version>
69-
<graphql-servlet.version>6.1.2</graphql-servlet.version>
70-
71-
<!-- Test Dependency Versions -->
72-
<junit.version>4.12</junit.version>
68+
<graphiql.version>5.0.2</graphiql.version>
69+
<graphql-java-servlet.version>6.1.3</graphql-java-servlet.version>
7370
</properties>
7471

7572
<build>
@@ -133,7 +130,7 @@
133130
<dependency>
134131
<groupId>com.graphql-java</groupId>
135132
<artifactId>graphql-java-servlet</artifactId>
136-
<version>${graphql-servlet.version}</version>
133+
<version>${graphql-java-servlet.version}</version>
137134
<exclusions>
138135
<exclusion>
139136
<groupId>com.fasterxml.jackson.core</groupId>

example/src/main/kotlin/com/expedia/graphql/sample/Application.kt

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import com.expedia.graphql.TopLevelObject
66
import com.expedia.graphql.execution.KotlinDataFetcherFactoryProvider
77
import com.expedia.graphql.hooks.SchemaGeneratorHooks
88
import com.expedia.graphql.sample.context.MyGraphQLContextBuilder
9-
import com.expedia.graphql.sample.dataFetchers.CustomDataFetcherFactoryProvider
10-
import com.expedia.graphql.sample.dataFetchers.SpringDataFetcherFactory
9+
import com.expedia.graphql.sample.datafetchers.CustomDataFetcherFactoryProvider
10+
import com.expedia.graphql.sample.datafetchers.SpringDataFetcherFactory
1111
import com.expedia.graphql.sample.directives.DirectiveWiringFactory
1212
import com.expedia.graphql.sample.directives.LowercaseDirectiveWiring
1313
import com.expedia.graphql.sample.exceptions.CustomDataFetcherExceptionHandler
@@ -59,11 +59,20 @@ class Application {
5959
dataFetcherFactoryProvider = dataFetcherFactoryProvider
6060
)
6161

62+
@Bean
63+
fun schemaPrinter() = SchemaPrinter(
64+
SchemaPrinter.Options.defaultOptions()
65+
.includeScalarTypes(true)
66+
.includeExtendedScalarTypes(true)
67+
.includeSchemaDefintion(true)
68+
)
69+
6270
@Bean
6371
fun schema(
6472
queries: List<Query>,
6573
mutations: List<Mutation>,
66-
schemaConfig: SchemaGeneratorConfig
74+
schemaConfig: SchemaGeneratorConfig,
75+
schemaPrinter: SchemaPrinter
6776
): GraphQLSchema {
6877
fun List<Any>.toTopLevelObjectDefs() = this.map {
6978
TopLevelObject(it)
@@ -74,13 +83,9 @@ class Application {
7483
mutations = mutations.toTopLevelObjectDefs(),
7584
config = schemaConfig
7685
)
77-
logger.info(SchemaPrinter(
78-
SchemaPrinter.Options.defaultOptions()
79-
.includeScalarTypes(true)
80-
.includeExtendedScalarTypes(true)
81-
.includeSchemaDefintion(true)
82-
).print(schema)
83-
)
86+
87+
logger.info(schemaPrinter().print(schema))
88+
8489
return schema
8590
}
8691

example/src/main/kotlin/com/expedia/graphql/sample/dataFetchers/CustomDataFetcherFactoryProvider.kt renamed to example/src/main/kotlin/com/expedia/graphql/sample/datafetchers/CustomDataFetcherFactoryProvider.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.expedia.graphql.sample.dataFetchers
1+
package com.expedia.graphql.sample.datafetchers
22

33
import com.expedia.graphql.execution.KotlinDataFetcherFactoryProvider
44
import com.expedia.graphql.hooks.SchemaGeneratorHooks
@@ -14,10 +14,10 @@ class CustomDataFetcherFactoryProvider(
1414
hooks: SchemaGeneratorHooks
1515
) : KotlinDataFetcherFactoryProvider(hooks) {
1616

17-
override fun propertyDataFetcherFactory(kClazz: KClass<*>, kProperty: KProperty<*>): DataFetcherFactory<Any> =
17+
override fun propertyDataFetcherFactory(kClass: KClass<*>, kProperty: KProperty<*>): DataFetcherFactory<Any> =
1818
if (kProperty.isLateinit) {
1919
springDataFetcherFactory
2020
} else {
21-
super.propertyDataFetcherFactory(kClazz, kProperty)
21+
super.propertyDataFetcherFactory(kClass, kProperty)
2222
}
23-
}
23+
}

example/src/main/kotlin/com/expedia/graphql/sample/dataFetchers/SpringDataFetcherFactory.kt renamed to example/src/main/kotlin/com/expedia/graphql/sample/datafetchers/SpringDataFetcherFactory.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.expedia.graphql.sample.dataFetchers
1+
package com.expedia.graphql.sample.datafetchers
22

33
import com.expedia.graphql.extensions.deepName
44
import graphql.schema.DataFetcher

pom.xml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,21 @@
7676
<!-- Dependency Versions -->
7777
<graphql-java.version>11.0</graphql-java.version>
7878
<jackson-module-kotlin.version>2.9.8</jackson-module-kotlin.version>
79-
<kotlin.version>1.3.11</kotlin.version>
80-
<kotlin-coroutines.version>1.1.0</kotlin-coroutines.version>
79+
<kotlin.version>1.3.21</kotlin.version>
80+
<kotlin-coroutines.version>1.1.1</kotlin-coroutines.version>
8181
<reflections.version>0.9.11</reflections.version>
8282

8383
<!-- Test Dependency Versions -->
84-
<junit-jupiter.version>5.3.2</junit-jupiter.version>
85-
<mockk.version>1.8.13.kotlin13</mockk.version>
86-
<rxjava.version>2.2.4</rxjava.version>
84+
<junit-jupiter.version>5.4.0</junit-jupiter.version>
85+
<mockk.version>1.9.1</mockk.version>
86+
<rxjava2.version>2.2.6</rxjava2.version>
8787

8888
<!-- Build Plugin Versions -->
8989
<dokka-maven-plugin.version>0.9.17</dokka-maven-plugin.version>
90-
<kotlin-detekt.version>1.0.0-RC12</kotlin-detekt.version>
91-
<kotlin-ktlint.version>0.29.0</kotlin-ktlint.version>
92-
<jacoco-maven-plugin.version>0.8.2</jacoco-maven-plugin.version>
93-
<surefire-plugin.version>2.22.1</surefire-plugin.version>
90+
<detekt-cli.version>1.0.0-RC13</detekt-cli.version>
91+
<ktlint.version>0.30.0</ktlint.version>
92+
<jacoco-maven-plugin.version>0.8.3</jacoco-maven-plugin.version>
93+
<maven-surefire-plugin.version>2.22.1</maven-surefire-plugin.version>
9494
</properties>
9595

9696
<pluginRepositories>
@@ -142,7 +142,7 @@
142142
<plugin>
143143
<groupId>org.apache.maven.plugins</groupId>
144144
<artifactId>maven-surefire-plugin</artifactId>
145-
<version>${surefire-plugin.version}</version>
145+
<version>${maven-surefire-plugin.version}</version>
146146
<configuration>
147147
<failIfNoTests>true</failIfNoTests>
148148
<includes>
@@ -182,6 +182,7 @@
182182
<configuration>
183183
<target name="detekt">
184184
<java taskname="detekt" dir="${project.basedir}" fork="true" failonerror="true" classname="io.gitlab.arturbosch.detekt.cli.Main" classpathref="maven.plugin.classpath">
185+
<arg value="--fail-fast" />
185186
<arg value="--input" />
186187
<arg value="${project.basedir}${file.separator}src" />
187188
<arg value="--config" />
@@ -216,12 +217,12 @@
216217
<dependency>
217218
<groupId>io.gitlab.arturbosch.detekt</groupId>
218219
<artifactId>detekt-cli</artifactId>
219-
<version>${kotlin-detekt.version}</version>
220+
<version>${detekt-cli.version}</version>
220221
</dependency>
221222
<dependency>
222223
<groupId>com.github.shyiko</groupId>
223224
<artifactId>ktlint</artifactId>
224-
<version>${kotlin-ktlint.version}</version>
225+
<version>${ktlint.version}</version>
225226
</dependency>
226227
</dependencies>
227228
</plugin>
@@ -310,7 +311,7 @@
310311
<dependency>
311312
<groupId>io.reactivex.rxjava2</groupId>
312313
<artifactId>rxjava</artifactId>
313-
<version>${rxjava.version}</version>
314+
<version>${rxjava2.version}</version>
314315
<scope>test</scope>
315316
</dependency>
316317
<dependency>
@@ -339,7 +340,7 @@
339340

340341
<build>
341342
<plugins>
342-
<!-- To release to Maven central -->
343+
<!-- Release to Maven central -->
343344
<plugin>
344345
<groupId>org.sonatype.plugins</groupId>
345346
<artifactId>nexus-staging-maven-plugin</artifactId>
@@ -360,7 +361,8 @@
360361
<autoReleaseAfterClose>true</autoReleaseAfterClose>
361362
</configuration>
362363
</plugin>
363-
<!-- To generate javadoc -->
364+
365+
<!-- Generate javadoc -->
364366
<plugin>
365367
<groupId>org.apache.maven.plugins</groupId>
366368
<artifactId>maven-source-plugin</artifactId>
@@ -374,10 +376,12 @@
374376
</execution>
375377
</executions>
376378
</plugin>
379+
380+
<!-- Attach javadocs to jar -->
377381
<plugin>
378382
<groupId>org.apache.maven.plugins</groupId>
379383
<artifactId>maven-javadoc-plugin</artifactId>
380-
<version>2.10.4</version>
384+
<version>3.0.1</version>
381385
<executions>
382386
<execution>
383387
<id>attach-javadocs</id>
@@ -388,11 +392,11 @@
388392
</executions>
389393
</plugin>
390394

391-
<!-- To sign the artifacts -->
395+
<!-- Sign the artifacts -->
392396
<plugin>
393397
<groupId>org.apache.maven.plugins</groupId>
394398
<artifactId>maven-gpg-plugin</artifactId>
395-
<version>1.5</version>
399+
<version>1.6</version>
396400
<executions>
397401
<execution>
398402
<id>sign-artifacts</id>
@@ -404,7 +408,6 @@
404408
</executions>
405409
</plugin>
406410
</plugins>
407-
408411
</build>
409412
</profile>
410413
</profiles>

src/main/kotlin/com/expedia/graphql/SchemaGeneratorConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ data class SchemaGeneratorConfig(
1515
)
1616

1717
/**
18-
*
18+
* The names of the top level objects in the schema.
1919
*/
2020
data class TopLevelNames(
2121
val query: String = "Query",

src/main/kotlin/com/expedia/graphql/exceptions/CouldNotCastArgumentException.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ package com.expedia.graphql.exceptions
22

33
import kotlin.reflect.KParameter
44

5+
/**
6+
* Thrown when a KParameter could not be cast or mapped to arguments in the data fetcher
7+
*/
58
class CouldNotCastArgumentException(kParameter: KParameter)
69
: GraphQLKotlinException("Could not cast or map arguments in the data fetcher for $kParameter")

src/main/kotlin/com/expedia/graphql/generator/types/MutationTypeBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ internal class MutationTypeBuilder(generator: SchemaGenerator) : TypeBuilder(gen
2020
mutationBuilder.name(config.topLevelNames.mutation)
2121

2222
for (mutation in mutations) {
23-
if (!mutation.kClass.isPublic()) {
23+
if (mutation.kClass.isPublic().not()) {
2424
throw InvalidMutationTypeException(mutation.kClass)
2525
}
2626

src/main/kotlin/com/expedia/graphql/generator/types/QueryTypeBuilder.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal class QueryTypeBuilder(generator: SchemaGenerator) : TypeBuilder(genera
2222
queryBuilder.name(config.topLevelNames.query)
2323

2424
for (query in queries) {
25-
if (!query.kClass.isPublic()) {
25+
if (query.kClass.isPublic().not()) {
2626
throw InvalidQueryTypeException(query.kClass)
2727
}
2828

0 commit comments

Comments
 (0)