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
{{ message }}
Repository navigation
Commit 3dcbbb7
Browse filesBrowse the repository at this point in the historyBrowse files
assertEquals(parser(unusedUnion).getUnusedDefinitions().map { it.javaClass.simpleName to it.name }.toSet(), setOf(
311
+
val (unused, warnings) = withWarnings { parser(unusedUnion).getUnusedDefinitions() }
312
+
313
+
assertEquals(unused.map { it.javaClass.simpleName to it.name }.toSet(), setOf(
308
314
"UnionTypeDefinition" to "FooBar",
309
315
"ObjectTypeDefinition" to "Foo",
310
316
"ObjectTypeDefinition" to "Bar",
311
317
"ObjectTypeDefinition" to "Baz"
312
318
))
319
+
assertEquals(warnings, listOf("FooBar", "Foo", "Bar", "Baz").map { "Schema type was defined but can never be accessed, and can be safely deleted: $it" })
313
320
314
321
val schema = parser(unusedUnion) {
315
322
dictionary(Foo::class, Bar::class, Baz::class)
@@ -321,35 +328,43 @@ class TypeExtensionTest {
321
328
322
329
@Test
323
330
fun`repeats and extensions without a type keep building`() {
324
-
val schema = parser(
325
-
"""
326
-
type Query {
327
-
color: Color
328
-
node: Node
329
-
fooBar: FooBar
330
-
}
331
+
val (schema, warnings) = withWarnings {
332
+
parser(
333
+
"""
334
+
type Query {
335
+
color: Color
336
+
node: Node
337
+
fooBar: FooBar
338
+
}
331
339
332
-
extend enum Color {
333
-
"The first red"
334
-
RED
335
-
}
336
-
extend enum Color { RED GREEN }
340
+
extend enum Color {
341
+
"The first red"
342
+
RED
343
+
}
344
+
extend enum Color { RED GREEN }
337
345
338
-
interface Node {
339
-
"The base id"
340
-
id: ID!
341
-
}
342
-
extend interface Node { id: ID! name: String }
346
+
interface Node {
347
+
"The base id"
348
+
id: ID!
349
+
}
350
+
extend interface Node { id: ID! name: String }
343
351
344
-
type Item implements Node { id: ID! name: String }
352
+
type Item implements Node { id: ID! name: String }
@@ -809,22 +804,6 @@ class UnmappedInputFieldsTest {
809
804
"Input field '$field' has no matching property in ${clazz.name}. Converting $usage$consequence. Known properties: $knownProperties. "+
810
805
"Rename the property or map it with @JsonProperty(\"${field.substringAfter('.')}\"). If it's left unmapped on purpose, list it in @JsonIgnoreProperties on the class."
0 commit comments