ceramicnetwork / ceramicnetwork/docs-docusaurus
BUG: Sample Graphql query fails in 'Interact with data' section
- Vorherrschende Sprache
- TypeScript
- Sterne
- 23
- Forks
- 11
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
**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
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit den Abschnitten „Create your composite“ und „Interact with data“ des Getting Started-Leitfadens und führe anschließend die dokumentierten composedb-Befehle und die GraphQL-Abfrage gegen das angegebene lokale Ceramic-Setup aus. Überprüfe, dass die abgerufenen Modelle Post und SimpleProfile sind und dass die postIndex-Abfrage erfolgreich ist; abgeschlossen ist die Aufgabe, wenn die Beispiel-IDs und Anweisungen das erwartete Abfrageergebnis liefern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- graphql
- Bereich
- documentation
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100