Async functions for querying public graph
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- api
調査の方向性
付録でリンクされている内部実装 packages/hypergraph-react/src/internal/use-query-public.tsx の384行目から始め、useQuery がスキーマクエリ、mapping、space、フィルターをどのように構築するかを追跡します。mapping と spaceId を指定するために提案されている2つのオプション設計を比較し、その後、サーバーサイドレンダリングおよび副作用を伴うクエリのための非同期クエリエントリポイントを定義します。React の useQuery フックなしでパブリックグラフデータをクエリできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Currently the only way to query the public graph using a specific schema is to go through Hypergraph's client-side useQuery hook. This works well when you need to modify the data, as we can keep the source of truth for queried data in the same place as modified data.
There are some use-cases where you just need to query for public data but not modify it. For this use case useQuery still works, but it won't work for server-side rendering or ad-hoc queries that run as a result of side-effects.
We should expose the query internals in a separate query(Schema) function.
Query options
Queries require things like the mapping or the space in order to generate the query + filters for a specific schema. We'll need a way to provide these options to the query at query time.
Option 1
We can pass the options to the query directly.
await query(Address, { mapping, spaceId })
Option 2
We can create a QueryClient which accepts options. Not entirely sure but this probably looks similar to hypergraph/react's internal context for spaces.
const client = new HypergraphClient({ mapping, spaceId });
await client.query(Address)
Appendix
- 主要言語
- TypeScript
- スター
- 22
- フォーク
- 12
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphprotocol/hypergraph のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
graphprotocol/hypergraph#517 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
graphprotocol/hypergraph#323 · コメント 3 件 ·
-
Improve Space Inbox オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
graphprotocol/hypergraph#542 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
graphprotocol/hypergraph#529 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
graphprotocol/hypergraph#528 ·
graphprotocol/hypergraph の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
0xMiden/bridge-portal#132 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
area:tools bug good first issue help wanted priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
TaewoooPark/Motifcode#14 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
newrelic-experimental/preflight#793 · コメント 1 件 ·