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

Kotlin Properties

Paweł Gutkowski edited this page Jul 28, 2017 · 1 revision

Kotlin properties are automatically inspected during schema creation. Schema DSL allows ignoring and deprecation of kotlin properties

Example

data class Person(val name: String, val age: Int)

KGraphQL.schema {
    type<Person>{
        property(Person::age){
            ignore = true
        }
        property(Person::name){
            deprecate("Person need no name")
        }
    }
}