Configuration

KGraphQL schema allows configuration of following properties:

Property Description Default value
useDefaultPrettyPrinter Schema pretty prints JSON reponses false
useCachingDocumentParser Schema caches parsed query documents true
documentParserCacheMaximumSize Schema document cache maximum size 1000
objectMapper Schema is using Jackson ObjectMapper from this property result of jacksonObjectMapper() from jackson-kotlin-module
acceptSingleValueAsArray Schema accepts single argument values as singleton list true
coroutineDispatcher Schema is using CoroutineDispatcher from this property CommonPool
executor Executor.Parallel

Example

KGraphQL.schema {
    configure {
        useDefaultPrettyPrinter = true
        objectMapper = jacksonObjectMapper()
        useCachingDocumentParser = false
    }
}