Hey guys, a quick question - would it be possible ...
# graphql-kotlin
m
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
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
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
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
That what graphql-inspector can help with https://github.com/kamilkisiela/graphql-inspector
m
cool, thanks, will check it out 🙂