Closed Allali84 closed 4 years ago
This looks great 👍
I'm in the process of making the SchemaConfigurationDSL
more extensible, so we can extend that one in here and have all ktor specific configuration under the same configuration DSL. But I think this will do for now 😃
When I'm finished with the new SchemaConfigurationDSL
I will change it, so it will be like this instead:
fun Route.graphql(block: SchemaBuilder.() -> Unit) = route(GRAPHQL_ENDPOINT) {
....
// Usage:
graphql {
configure {
// Both core and ktor specific configuration will be available within this DSL block.
context { call ->
call.authentication.principal<User>()?.let {
+it
}
}
}
...
}
Hello @jeggy I implemented the solution that you designed using kotlinx.serialization I added a new module "example" as example of use tell me how you think about it :)