Do KGraphql or ExpediaGroup’s graphql-kotlin allow...
# graphql-kotlin
a
Do KGraphql or ExpediaGroup’s graphql-kotlin allow you to automatically generate graphql schema based your domains(db schema)?
d
not familiar with
KGraphQL
but in case of
graphql-kotlin
we generate schemas from your source code -> so it could generate the schema if you have your DB structure represented in the code. Personally I believe that GraphQL works best as an abstraction of your domain/db data into something that is usable for your experience layer so I would expose some transformed data views instead.
graphql-kotlin
does not generate schema directly from DB. If you want to expose your DB schema directly then take a look at
hasura
as it might fit your needs.
a
@Dariusz Kuc thanks. Actually I was planning to use it alongside SqlDelight. I would have to create the schema myself that way I think.
d
Not familiar with
SqlDelight
. I'd assume you might be able to use those files to generate the schema but it might get troublesome due to interfaces/methods (you could workaround it using schema generator hooks but it might be simpler to create separate GraphQL schema files from which you would call sql stuff)
🙏 1
a
Thanks @Dariusz Kuc i’ll experiment and ask questions when they come up
👍 1