@vlaaad it's possibly some code change might accidentally change the schema right? Having version control is no safe guard against that, just allows you to go back. Expedia Group, the creators of graphql-kotlin, use a tool from appolo to check the generated schema for backwards incompatible schema changes each commit. If the whole schema is in one edn file, it's less likely to accidently change I think.
@gklijs I don’t see how file extension .edn
vs .clj
helps with these “accidental changes”. I don’t know anyone who randomly changes neither their code, nor resources. The difference between embedding schema in code vs using external file is a layer of indirection and post-processing that is required because of that indirection.
As edn, finding actual resolver requires searching for usages of attach-resolvers
:
{:type (non-null :human)
:args {:id {:type String}}
:resolve :human}
As clj, finding actual resolver is just a “go to definition”:
{:type '(non-null :human)
:args {:id {:type 'String}}
:resolve human}
Yes, but it keeps everything together. Randomly and accidentally are different things..
what keeps everything together?