HN user

pjnz

12 karma
Posts1
Comments7
View on HN

I did some fiddling around building a graphql layer with a bunch of complex types. Basically this was trying to encode all the various GraphQL rules into the type system itself e.g. if a resolver takes arguments, ensure that a schema of the correct type is provided as an object etc. I also built a client that would take a schema and ensure you used it correctly at compile time.

Example of the code: https://github.com/pj/typeshaman/blob/main/packages/graphql/...

Documentation is incomplete, unfortunately I had to get a job. I started working on encoding all of SQL as well.

Hacn: https://github.com/pj/hacn. It’s kind of like a React “monad” written in F#/Fable using computation expressions. Sort of like async, but control flow is a bit different, basically "Promises" can trigger re-execution of subsequent steps in the function. Right now its alpha quality and any feedback is welcome.