https://kotlinlang.org logo
#graphql-kotlin
Title
# graphql-kotlin
m

Martin Brehovsky

05/06/2021, 7:57 PM
Hey guys, a quick question - would it be possible for graphql-kotlin to be able to verify compatibility with existing schema? I really like the fact we can derive the schema from the code (definitely the way forward), but I wonder if we could have a mode which can tell us if the schema is the same as expected supplied schema or how they differ ... if this does not exists, how difficult this might be to be added?
d

Dariusz Kuc

05/06/2021, 8:06 PM
currently we don't have plans to support this within the library
you could use something like https://graphql-inspector.com/ to achieve that (which would also detect breaking changes etc)
s

Shane Myrick

05/06/2021, 8:51 PM
As part of the build process you can generate the SDL file using the new included plugins https://expediagroup.github.io/graphql-kotlin/docs/plugins/hooks-provider Then it should be simple enough to diff two SDL files
m

Martin Brehovsky

05/06/2021, 10:00 PM
Right, the problem with diffing is it is textual and order might differ, not to mention comments and other differences. I think we need more like schema model level diffing. Thinking out loud - I wonder if there is a way to use the code generator to load the schemas and then build a facility which can compare two models in memory ...
s

Shane Myrick

05/06/2021, 10:08 PM
That what graphql-inspector can help with https://github.com/kamilkisiela/graphql-inspector
m

Martin Brehovsky

05/06/2021, 10:09 PM
cool, thanks, will check it out 🙂