graphql

gklijs 2020-04-23T03:18:20.045700Z

@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.

vlaaad 2020-04-23T06:52:25.045900Z

@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}

gklijs 2020-04-23T06:56:27.046200Z

Yes, but it keeps everything together. Randomly and accidentally are different things..

vlaaad 2020-04-23T06:57:05.046400Z

what keeps everything together?