You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 📝 Description
Updated Ktor and updated failing tests and fixed compile issues
resulting from the update.
Also updated some libraries.
### 🔗 Related Issues
#2037
---------
Co-authored-by: TheDome0 <[email protected]>
Copy file name to clipboardExpand all lines: examples/server/ktor-server/src/main/kotlin/com/expediagroup/graphql/examples/server/ktor/GraphQLModule.kt
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/custom-scalars-kotlinx/src/main/kotlin/com/expediagroup/scalars/Application.kt
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/custom-scalars-kotlinx/src/test/kotlin/com/expediagroup/scalars/CustomScalarKotlinxTests.kt
+17-17
Original file line number
Diff line number
Diff line change
@@ -31,11 +31,11 @@ class CustomScalarKotlinxTests {
31
31
32
32
@Test
33
33
fun`verify custom scalars are correctly serialized and deserialized`() {
34
-
valengine= embeddedServer(CIO, port =0, module =Application::graphQLModule)
34
+
valembeddedServer= embeddedServer(CIO, port =0, module =Application::graphQLModule)
35
35
try {
36
-
engine.start()
36
+
embeddedServer.start()
37
37
runBlocking {
38
-
val port = engine.resolvedConnectors().first().port
38
+
val port =embeddedServer.engine.resolvedConnectors().first().port
39
39
val client =GraphQLKtorClient(url =URL("http://localhost:$port/graphql"))
40
40
41
41
val undefinedLocaleQuery =LocaleQuery(variables =LocaleQuery.Variables())
@@ -52,17 +52,17 @@ class CustomScalarKotlinxTests {
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/ktor-jackson/src/main/kotlin/com/expediagroup/ktor/jackson/Application.kt
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/ktor-jackson/src/test/kotlin/com/expediagroup/ktor/jackson/ApplicationTest.kt
+4-4
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,11 @@ import kotlin.test.assertNull
18
18
classApplicationTest {
19
19
@Test
20
20
fun`verify ktor client can execute queries`() {
21
-
valengine= embeddedServer(CIO, port =0, module =Application::graphQLModule)
21
+
valembeddedServer= embeddedServer(CIO, port =0, module =Application::graphQLModule)
22
22
try {
23
-
engine.start()
23
+
embeddedServer.start()
24
24
runBlocking {
25
-
val port = engine.resolvedConnectors().first().port
25
+
val port =embeddedServer.engine.resolvedConnectors().first().port
26
26
val client =GraphQLKtorClient(url =URL("http://localhost:$port/graphql"))
27
27
28
28
val result = client.execute(TestQuery(variables =TestQuery.Variables(name =OptionalInput.Defined("junit"))))
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/ktor-kotlinx/src/main/kotlin/com/expediagroup/ktor/kotlinx/Application.kt
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/ktor-kotlinx/src/test/kotlin/com/expediagroup/ktor/kotlinx/ApplicationTest.kt
+4-4
Original file line number
Diff line number
Diff line change
@@ -18,11 +18,11 @@ import kotlin.test.assertNull
18
18
classApplicationTest {
19
19
@Test
20
20
fun`verify ktor client can execute queries`() {
21
-
valengine= embeddedServer(CIO, port =0, module =Application::graphQLModule)
21
+
valembeddedServer= embeddedServer(CIO, port =0, module =Application::graphQLModule)
22
22
try {
23
-
engine.start()
23
+
embeddedServer.start()
24
24
runBlocking {
25
-
val port = engine.resolvedConnectors().first().port
25
+
val port =embeddedServer.engine.resolvedConnectors().first().port
26
26
val client =GraphQLKtorClient(url =URL("http://localhost:$port/graphql"))
27
27
28
28
val result = client.execute(TestQuery(variables =TestQuery.Variables(name =OptionalInput.Defined("junit"))))
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/polymorphic-types-kotlinx/src/main/kotlin/com/expediagroup/polymorphic/Application.kt
Copy file name to clipboardExpand all lines: integration/gradle-plugin-integration-tests/client-generator/polymorphic-types-kotlinx/src/test/kotlin/com/expediagroup/polymorphic/PolymorphicKotlinxTests.kt
+8-8
Original file line number
Diff line number
Diff line change
@@ -26,11 +26,11 @@ class PolymorphicKotlinxTests {
26
26
27
27
@Test
28
28
fun`verify polymorphic queries are correctly serialized and deserialized`() {
29
-
valengine= embeddedServer(CIO, port =0, module =Application::graphQLModule)
29
+
valembeddedServer= embeddedServer(CIO, port =0, module =Application::graphQLModule)
30
30
try {
31
-
engine.start()
31
+
embeddedServer.start()
32
32
runBlocking {
33
-
val port = engine.resolvedConnectors().first().port
33
+
val port =embeddedServer.engine.resolvedConnectors().first().port
34
34
val client =GraphQLKtorClient(url =URL("http://localhost:$port/graphql"))
35
35
36
36
val query =CompletePolymorphicQuery(variables =CompletePolymorphicQuery.Variables(input ="foo"))
@@ -46,16 +46,16 @@ class PolymorphicKotlinxTests {
46
46
assertNull(nullResponse.data?.unionQuery)
47
47
}
48
48
} finally {
49
-
engine.stop(1000, 1000)
49
+
embeddedServer.stop(1000, 1000)
50
50
}
51
51
}
52
52
53
53
@OptIn(ExperimentalSerializationApi::class)
54
54
@Test
55
55
fun`verify polymorphic queries fallbacks are correctly serialized and deserialized`() {
56
-
valengine= embeddedServer(CIO, port =0, module =Application::graphQLModule)
56
+
valembeddedServer= embeddedServer(CIO, port =0, module =Application::graphQLModule)
57
57
try {
58
-
engine.start()
58
+
embeddedServer.start()
59
59
runBlocking {
60
60
// need to register fallback logic
61
61
val serializerWithFallback =GraphQLClientKotlinxSerializer(jsonBuilder = {
@@ -68,7 +68,7 @@ class PolymorphicKotlinxTests {
68
68
}
69
69
}
70
70
})
71
-
val port = engine.resolvedConnectors().first().port
71
+
val port =embeddedServer.engine.resolvedConnectors().first().port
72
72
val client =GraphQLKtorClient(url =URL("http://localhost:$port/graphql"), serializer = serializerWithFallback)
73
73
74
74
val fallbackQuery =PartialPolymorphicQuery(variables =PartialPolymorphicQuery.Variables(input ="bar"))
Copy file name to clipboardExpand all lines: integration/graphql-http-spec/ktor-server/src/main/kotlin/com/expediagroup/http/spec/ktor/GraphQLModule.kt
0 commit comments