ceramicnetwork / ceramicnetwork/docs-docusaurus

BUG: Sample Graphql query fails in 'Interact with data' section

オープン
#79 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug help wanted
主要言語
TypeScript
スター
23
フォーク
11
PR マージ指標
30日以内にマージされた PR はありません

説明

**Describe the bug**
Compiling composites shown at the "Create your composite" pull different models than those in the docs (expect: Post and SimpleProfile, getting: MyModel and SimpleProfile). Then when executing the first query in the 'Interact with data' section the query for postIndex fails.
My assumption: model stream IDs on clay testnet are outdated in the docs, or may be fetched from mainnet.

**To Reproduce**
Steps to reproduce the behavior (following the Getting Started guide):
1. Create the composite:
```
composedb composite:from-model kjzl6hvfrbw6c5ajfmes842lu09vjxu5956e3xq0xk12gp2jcf9s90cagt2god9 kjzl6hvfrbw6cb905umdi33gp1em1sp7b235z2h2orphj2p14by6llq9gwynsaf --ceramic-url=http://localhost:7007 --output=my-first-composite.json
```
2. Deploy composite
```
composedb composite:deploy my-first-composite.json --ceramic-url=http://localhost:7007 --did-private-key=your-private-key
```
4. Compile composite
```
composedb composite:compile my-first-composite.json runtime-composite.json
```
6. Start Graphiql with compiled composite file
```
composedb graphql:server --ceramic-url=http://localhost:7007 --graphiql runtime-composite.json --did-private-key=your-private-key --port=5005
```
8. Open ```http://localhost:5005/graphql``` and run query:
```graphql
query{
postIndex(first: 2) {
edges {
node {
text
}
}
}
}
```
10. See error:
```graphql
{
"errors": [
{
"message": "Cannot query field \"postIndex\" on type \"Query\".",
"locations": [
{
"line": 2,
"column": 3
}
]
}
]
}
```
**Expected behavior**
Fetched models should match to Post and SimpleProfile, so that the query can be run.

**Machine, OS, browser information (please complete the following information):**
Linux, PopOs 22.04, Firefox. Node 20.11.1, npm 10.2.4

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

Getting Started ガイドの「Create your composite」セクションと「Interact with data」セクションから始め、続いて、記載されている composedb コマンドと GraphQL クエリを、指定されたローカルの Ceramic セットアップに対して再現します。取得されたモデルが Post と SimpleProfile であり、postIndex クエリが成功することを確認します。サンプル ID と手順によって期待されるクエリ結果が得られれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
graphql
領域
documentation
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。