Skip to content

switch state from internal to public #415

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import kotlin.reflect.KType
@Suppress("LeakingThis")
open class SchemaGenerator(val config: SchemaGeneratorConfig) {

internal val state = SchemaGeneratorState(config.supportedPackages)
val state = SchemaGeneratorState(config.supportedPackages)
internal val subTypeMapper = SubTypeMapper(config.supportedPackages)
internal val codeRegistry = GraphQLCodeRegistry.newCodeRegistry()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ import kotlin.reflect.KClass
/**
* Container for the types cache information.
*/
internal data class KGraphQLType(val kClass: KClass<*>, val graphQLType: GraphQLType)
data class KGraphQLType(val kClass: KClass<*>, val graphQLType: GraphQLType)
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import graphql.schema.GraphQLType
import java.util.concurrent.ConcurrentHashMap

@Suppress("UseDataClass")
internal class SchemaGeneratorState(supportedPackages: List<String>) {
class SchemaGeneratorState(supportedPackages: List<String>) {
val cache = TypesCache(supportedPackages)
val additionalTypes = mutableSetOf<GraphQLType>()
val directives = ConcurrentHashMap<String, GraphQLDirective>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import kotlin.reflect.KType
import kotlin.reflect.full.createType
import kotlin.reflect.full.isSubclassOf

internal class TypesCache(private val supportedPackages: List<String>) {
class TypesCache(private val supportedPackages: List<String>) {

private val cache: MutableMap<String, KGraphQLType> = mutableMapOf()
private val typeUnderConstruction: MutableSet<KClass<*>> = mutableSetOf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ package com.expediagroup.graphql.generator.state

import kotlin.reflect.KType

internal data class TypesCacheKey(val type: KType, val inputType: Boolean)
data class TypesCacheKey(val type: KType, val inputType: Boolean)