Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.

Configuration

Paweł Gutkowski edited this page Jul 28, 2017 · 3 revisions

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

Example

KGraphQL.schema {
    configure {
        useDefaultPrettyPrinter = true
        objectMapper = jacksonObjectMapper()
        useCachingDocumentParser = false
    }
}
Clone this wiki locally