Am pressed for time right now. Look at comments & commit messages for commentary.
Essentially, this explores a Servant-like API, realises that we need to have some basic structure around:
getting queries into a useful form for processing
turning haskell values into graphql values
responding correctly with graphql values
There are also some gestures to the type-level API / Schema description, but my own explorations have led me to favour this outside-in approach. We'll need all of the stuff above regardless of how user application code decides to actually handle queries, and figuring them out can make the type-level Servant-like parts easier to reason about.
Thus, I'm trying hard to get the types right, because a lot of stuff follows from that. Not saying that the ones I have here are correct as they stand, but rather that I've put a lot of thought into them and am keen to keep working on them.
Am pressed for time right now. Look at comments & commit messages for commentary.
Essentially, this explores a Servant-like API, realises that we need to have some basic structure around:
There are also some gestures to the type-level API / Schema description, but my own explorations have led me to favour this outside-in approach. We'll need all of the stuff above regardless of how user application code decides to actually handle queries, and figuring them out can make the type-level Servant-like parts easier to reason about.
Thus, I'm trying hard to get the types right, because a lot of stuff follows from that. Not saying that the ones I have here are correct as they stand, but rather that I've put a lot of thought into them and am keen to keep working on them.
Tests were surprisingly useful to add.
This change is