Skip to content

Commit c36df17

Browse files
authored
1 parent b0e5e08 commit c36df17

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

libraries/apollo-ast/build.gradle.kts

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ kotlin {
3232
getByName("jvmTest") {
3333
dependencies {
3434
implementation(libs.google.testparameterinjector)
35+
implementation(libs.kotlin.test)
3536
}
3637
}
3738
}

libraries/apollo-ast/src/commonTest/kotlin/com/apollographql/apollo/graphql/ast/test/CommonParserTest.kt

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import com.apollographql.apollo.ast.parseAsGQLDocument
99
import com.apollographql.apollo.ast.parseAsGQLValue
1010
import kotlin.test.Test
1111
import kotlin.test.assertEquals
12+
import kotlin.test.assertFails
1213
import kotlin.test.fail
1314

1415
class CommonParserTest {
@@ -111,4 +112,19 @@ query Test {
111112
assertEquals(3, column)
112113
}
113114
}
115+
116+
/**
117+
* https://github.com/graphql/graphql-spec/issues/1106
118+
*/
119+
@Test
120+
fun extendTypeMustAddDirectiveFieldOrInterface() {
121+
assertFails {
122+
"""
123+
extend type Query
124+
""".trimIndent()
125+
.parseAsGQLDocument()
126+
.getOrThrow()
127+
128+
}
129+
}
114130
}

0 commit comments

Comments
 (0)