https://kotlinlang.org logo
#ktor
Title
# ktor
m

manlan

06/27/2020, 3:07 PM
Is there a good tutorial on using GraphQL on server side using Ktor?
d

Dariusz Kuc

06/27/2020, 7:32 PM
for generating schema you can also use https://github.com/ExpediaGroup/graphql-kotlin *disclaimer: I am one of the creators/maintainers of that project
1
m

manlan

06/28/2020, 12:44 PM
@Dariusz Kuc Hey! I do know of this library, but there seems to be support only for Spring on the server-side. But why? Why not make it generic so it can be used with any framework? 😞
d

Dariusz Kuc

06/28/2020, 1:02 PM
👋 we only provide spring integration as that’s what we use internally and we know its tested and works correctly. That being said schema generation part and overall runtime (still relying on
graphql-java
) is agnostic of any framework so can be integrated with Spring (provided), Spark (see examples within the repo), Javalin (I’d call it still an early alpha/beta -> https://javalin.io/plugins/graphql) and any other frameworks.
Afaik there are some users that do use it with Ktor
j

jeggy

06/28/2020, 2:29 PM
KGraphQL is in the process right now in creating ktor plugin that will be easy to setup with a simple install call like you currently do with any other features in ktor.
We are using KGraphQL with ktor in production
m

manlan

06/28/2020, 4:02 PM
@Dariusz Kuc Thank you, will explore the library deeper
@jeggy Sounds cool! 😍 Is it being developed in the open?
j

jeggy

06/28/2020, 4:04 PM
Yes the github repository is here: https://github.com/aPureBase/KGraphQL I just finished first draft of the ktor docs: https://kgraphql.io/Plugins/ktor/
🆒 1
👍🏼 1
3 Views