Re:Hasura GraphQL Engine 2.0
by dmitryminkovsky on Thursday June 24, 2021 @08:41AM
(#27616651)
That's a lot harder than unit testing, for me at least. When you have a small team (or a team consisting of 1 person :)) there are just so many other things you'll end up needing to do before properly verifying functions that "work."
Just create a new test database, populate it with test data, call the function with test inputs and assert that the return value and the SQL dump of the resulting state of the database are what you expect.