Fork me on GitHub

@tony.kay how do you usually test backend queries/mutations? I was thinking i could put all the logic in helper functions then test those


i was wondering if you had any built in support for that? i know only mutations can be intern’ed


or i suppose i could invoke the multimethod that dispatches to them


no built-in support really. As a general rule I find that tests are best with the least amount of entangled stuff...unfortunately, in a dynamic language that means I don't get the "you glued them together reasonably" test of a static type system. Clojure specs help, but I still struggle to get the same quality of test suite in Clojure as I do in Java.


but I write a ton less there's that


for queries/mutations: I prefer helpers that can be tested...even better if you can isolate the I/O layer from the actual entry point, but sometimes that feels pretty contrived

👍 4