Skip to content

Commit 673b343

Browse files
committed
Revert change to unvalidatedTypes
1 parent 236d20c commit 673b343

File tree

3 files changed

+2
-18
lines changed

3 files changed

+2
-18
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<groupId>com.graphql-java-kickstart</groupId>
66
<artifactId>graphql-java-tools</artifactId>
7-
<version>12.1.1-SNAPSHOT</version>
7+
<version>12.1.1-oryan4-SNAPSHOT</version>
88
<packaging>jar</packaging>
99

1010
<name>GraphQL Java Tools</name>

src/main/kotlin/graphql/kickstart/tools/SchemaClassScanner.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ internal class SchemaClassScanner(
4444
private val fieldResolverScanner = FieldResolverScanner(options)
4545
private val typeClassMatcher = TypeClassMatcher(definitionsByName)
4646
private val dictionary = mutableMapOf<TypeDefinition<*>, DictionaryEntry>()
47-
private val unvalidatedTypes = mutableSetOf<TypeDefinition<*>>(*scalarDefinitions.toTypedArray())
47+
private val unvalidatedTypes = mutableSetOf<TypeDefinition<*>>()
4848
private val queue = linkedSetOf<QueueItem>()
4949

5050
private val fieldResolversByType = mutableMapOf<ObjectTypeDefinition, MutableMap<FieldDefinition, FieldResolver>>()

src/test/kotlin/graphql/kickstart/tools/SchemaClassScannerTest.kt

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,6 @@ class SchemaClassScannerTest {
434434
435435
# these directives are defined in the Apollo Federation Specification:
436436
# https://www.apollographql.com/docs/apollo-server/federation/federation-spec/
437-
scalar _FieldSet
438-
directive @key(fields: _FieldSet!) repeatable on OBJECT | INTERFACE
439-
directive @extends on OBJECT | INTERFACE
440-
directive @external on FIELD_DEFINITION
441-
442437
type User @key(fields: "id") @extends {
443438
id: ID! @external
444439
recentPurchasedProducts: [Product]
@@ -454,7 +449,6 @@ class SchemaClassScannerTest {
454449
})
455450
.options(SchemaParserOptions.newOptions().includeUnusedTypes(true).build())
456451
.dictionary(User::class)
457-
.scalars(fieldSet)
458452
.build()
459453
.makeExecutableSchema()
460454

@@ -477,16 +471,6 @@ class SchemaClassScannerTest {
477471
var street: String? = null
478472
}
479473

480-
private val fieldSet: GraphQLScalarType = GraphQLScalarType.newScalar()
481-
.name("_FieldSet")
482-
.description("_FieldSet")
483-
.coercing(object : Coercing<String, String> {
484-
override fun parseValue(input: Any) = input.toString()
485-
override fun serialize(dataFetcherResult: Any) = dataFetcherResult as String
486-
override fun parseLiteral(input: Any) = input.toString()
487-
})
488-
.build()
489-
490474
@Test
491475
fun `scanner should handle unused types with interfaces when option is true`() {
492476
val schema = SchemaParser.newParser()

0 commit comments

Comments
 (0)