2024-01-01から1年間の記事一覧

Rustで$refを使うJSON Schemaを作成してバリデーションする

次のようなJSON Schemaがあるとする。 { "type": "object", "properties": { "foo": { "$ref": "#/definitions/foo" } }, "required": [ "foo" ] } $refでJSON Pointer "#/definitions/foo"によって参照しているスキーマは内部に存在してほしいが、なぜか今…

async-graphqlで独自の名前とフィールドを持つconnection/edgeを定義する

GraphQLで、適切にグラフ上のノード間の関係を示すために、connectionやedgeに独自の名前をつけて、独自のフィールドも追加したいことがある。 Explaining GraphQL Connections | Apollo GraphQL Blog Instead think of them as the relationship between tw…

定義する例外を減らしつつソフトウェアを設計する方法を"A Philosophy of Software Design"から学ぶ

会社の読書会で"A Philosophy of Software Design"を読んでいる。 A Philosophy of Software Design, 2nd Edition (English Edition)作者:Ousterhout, John K. Amazon 自分の担当で第10章"Define Errors Out Of Existence"をしっかり読む機会があり、けっこ…