hi folks, jeff from apollo tells me y’all (the exp...
# graphql-kotlin
l
hi folks, jeff from apollo tells me y’all (the expedia team) have figured out a way to check the generated SDL into source control that reflects changes to your kotlin classes — is that true? how does it work?
d
hi 👋 yes we generate SDL as a build artifact and we use it for PR checks (schema validation) as well as an input to our gateway
tldr -> we build a custom plugin that generates the SDL unfortunately due to the current generator logic it is not easy to make it generic -> https://github.com/ExpediaGroup/graphql-kotlin/issues/705
l
cool, making a build artifact totally makes sense. but it’s not actually checked into source control right? you don’t have a .graphql file you can review?
d
we store it in a database
l
cool cool that’s what we’re doing too … i think i confused jeff when i asked the question
i can’t think of a way to actually check in the graphql file without a gnarly precommit hook that no one would want
d
also unsure how useful it would be to have this file checked in
as it could potentially change over every commit
l
yeah … some folks here want to code review SDLs instead of kotlin/go/ruby/whatever, but i’m on your side
j
would a reasonable way to do this to have a "test" that sets up a GraphQL instance same as the app does and runs an introspection query to generate the build artifact, or is there a better still-not-generic way to generate the SDL?
d
probably thats the easiest (i.e. starting up an app and running introspection or just retrieving sdl)
👍 1