I had a more general GraphQL question wrt to writing queries with variables…. You spend a lot of up-front time defining/honing your schema (input-objects, args, fields, etc) and you have this pretty thorough and self-describing interface as your contract with the rest of the world. Neat.
But when you write queries that use variables, suddenly, you have to re-declare your variable types… there’s nothing preventing you from mistyping your types or forgetting an !
, and you end up having to crawl back through your definitions and telling GraphQL stuff that it seems like it should already know, e.g.
mutation ($x:String, $y:Stonks,$z:DejaVu,$zz:ForgotExclamationPoint){
doThing(x:$x,y:$y,z:$z,zz:$zz) {
foo
bar
etc
}
}
This isn’t an Absinthe-specific question, but it doesn’t seem appropriate for StackOverflow either, so I’m hoping someone can shed light on why GraphQL is this way.