Month: 2020-07



Kevin Hsu 10:17:02
@mattandkevin1060 has joined the channel




mofas 05:24:24
mofas 05:25:12
用text generator 已經可以gen 出react component不稀奇
mofas 05:25:22
可以gen 出Q&A 的答案
mrorz 16:39:46
(Expected) error handling on GraphQL using union types

2. 我自己現在的 Graphql mutation 結果設計是用前 <|medium> 的設計延伸的,所有的操作不是權限跟 input 格式問題的話,都統一回傳 &lt;Mutation&gt;Result 。 Result 是 錯誤 Type 跟 成功結果的 union。 ```Type Reply {...} interface UserError { message: String! } Type IsBlockedError extend UserError { message: String! // other props you want to show } union UpdateReplyResult = Reply | IsBlockedError Mutation { updateReply(input: UpdateReplyInput!): UpdateReplyResult! }```


jihchi 21:13:58|

Monads, Explained Without Bullshit

there’s a CS theory term, “monad,” that has a reputation among extremely online programmers as being a really difficult to understand concept that nobody knows how to actually explain. for a while, i thought that reputation was accurate; i tried like six times to understand what a monad is, and couldn’t get anywhere. but then a friend sent me Philip Wadler’s 1992 paper “Monads for functional programming” which turns out to be a really good explanation of what a monad is (in addition to a bunch of other stuff i don’t care about). so i’m gonna be repackaging the parts i like of that explanation here.