Hello friends I'm writing my first ktor plugin for...
# ktor
Hello friends I'm writing my first ktor plugin for GraphQL Kotlin which is very nice, apart from the initial setup which is very not nice. It's my first ktor plugin, any feedback ? https://github.com/jmfayard/graphql-kotlin/blob/ktor-plugin/examples/server/ktor-s[…]/com/expediagroup/graphql/examples/server/ktor/GraphQLModule.kt
K 1
👀 3
I like the DSL that you have put together as the
from the expedia samples is very boilerplatey. Here I am wondering how would you inject dependencies into each of the services as objects are constructed on plugin initialization rather than a per-request basis; unless you'd shove that into the context map factory
I'd like to mention that the playground has been replaced by the more modern "studio.apollographql.com" which we can simply redirect with:
for those that are allowed to use a third-party client rather than something that needs to be hosted on the same machine. This also involves some CORS handling
Actually nevermind on the DI. That should be handled through the GQL Context and you're providing a nice lambda for that ✅