Skip to content

Commit 85aeccb

Browse files
authored
Merge pull request #103 from ceramicnetwork/update-models
Update the model IDs in guides
2 parents 2eaaef4 + 5f6ca04 commit 85aeccb

5 files changed

Lines changed: 20 additions & 20 deletions

File tree

docs/composedb/create-your-composite.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In this section we will show how to create a composite by downloading models fro
4949
You can fetch any existing model from the catalog by referencing the model’s unique ID. For example, for your basic social media app, use the existing model `SimpleProfile`. To fetch the model, to your working directory, take note of the model stream ID in the table above and run the following command:
5050

5151
```bash
52-
composedb composite:from-model kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep --ceramic-url=http://localhost:7007 --output=my-first-composite.json
52+
composedb composite:from-model kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65 --ceramic-url=http://localhost:7007 --output=my-first-composite.json
5353
```
5454

5555
You should see the following output in your terminal:
@@ -65,7 +65,7 @@ This output means that you now have the `SimpleProfile` model stored locally in
6565
If your application needs multiple models, for example the `SimpleProfile` and `Post` models, you can. To fetch them, take note of the model stream IDs and provide them in a ComposeDB CLI command as follows:
6666

6767
```bash
68-
composedb composite:from-model kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep kjzl6hvfrbw6c7gkodzmqq5s031yfo5xdllvcr1z0tumwl7kpml4gfe5gbwh2bg --ceramic-url=http://localhost:7007 --output=my-first-composite.json
68+
composedb composite:from-model kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65 kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy --ceramic-url=http://localhost:7007 --output=my-first-composite.json
6969
```
7070

7171
The output of this command will be a composite file named `my-first-composite.json`.
@@ -85,16 +85,16 @@ You should see the output similar to the one below:
8585
```bash
8686
ℹ Using DID did:key:z6MkoDgemAx51v8w692aZRLPdwP6UPKj3EgUhBTvbL7hCwLu
8787
✔ Deploying the composite... Done!
88-
["kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep"]
88+
["kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65"]
8989
```
9090

9191
Whenever composites are deployed, the models will be automatically indexed. This also means that these models are shared across the network (at the moment, only Clay testnet). If you check the output produced by the terminal that runs your Ceramic local node, you should see a similar output:
9292

9393
```bash
94-
IMPORTANT: Starting indexing for Model kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep
95-
IMPORTANT: Starting indexing for Model kjzl6hvfrbw6c7gkodzmqq5s031yfo5xdllvcr1z0tumwl7kpml4gfe5gbwh2bg
96-
IMPORTANT: Creating ComposeDB Indexing table for model: kjzl6hvfrbw6c5bf2jmwo9scp1ctkqvs5nru1jfjb1dgqqnf90sycptlztjdfep
97-
IMPORTANT: Creating ComposeDB Indexing table for model: kjzl6hvfrbw6c7gkodzmqq5s031yfo5xdllvcr1z0tumwl7kpml4gfe5gbwh2bg
94+
IMPORTANT: Starting indexing for Model kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65
95+
IMPORTANT: Starting indexing for Model kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy
96+
IMPORTANT: Creating ComposeDB Indexing table for model: kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65
97+
IMPORTANT: Creating ComposeDB Indexing table for model: kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy
9898
```
9999

100100
This means that the composite was deployed and the models were indexed on your local node successfully! 🎉

docs/composedb/guides/data-modeling/composites.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ As an example, let’s reuse the `merged-composite.json` file from the previous
214214
<TabItem value="cli">
215215

216216
```bash
217-
composedb composite:extract-model merged-composite.json kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc --output=new-composite.json
217+
composedb composite:extract-model merged-composite.json kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65 --output=new-composite.json
218218
```
219219

220220
</TabItem>
@@ -228,7 +228,7 @@ import { readEncodedComposite, writeEncodedComposite } from '@composedb/devtools
228228
const ceramic = new CeramicClient('http://localhost:7007')
229229
const sourceComposite = await readEncodedComposite(ceramic, 'merged-composite.json')
230230

231-
const mergedComposite = sourceComposite.copy(['kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc'])
231+
const mergedComposite = sourceComposite.copy(['kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65'])
232232
await writeEncodedComposite(mergedComposite, 'new-composite.json')
233233
```
234234
</TabItem>
@@ -252,8 +252,8 @@ To manually set aliases for your models, add the following section to your compo
252252

253253
```jsx
254254
"aliases":{
255-
"kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc":"SimpleProfile",
256-
"kjzl6hvfrbw6c99mdfpjx1z3fue7sesgua6gsl1vu97229lq56344zu9bawnf96":"Post"
255+
"kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65":"SimpleProfile",
256+
"kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy":"Post"
257257
}
258258
```
259259

@@ -268,8 +268,8 @@ const ceramic = new CeramicClient('http://localhost:7007')
268268
const sourceComposite = await readEncodedComposite(ceramic, 'merged-composite.json')
269269

270270
const newComposite = sourceComposite.setAliases({
271-
'kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc': 'SimpleProfile',
272-
'kjzl6hvfrbw6c99mdfpjx1z3fue7sesgua6gsl1vu97229lq56344zu9bawnf96': 'Post',
271+
'kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65': 'SimpleProfile',
272+
'kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy': 'Post',
273273
})
274274
await writeEncodedComposite(newComposite, 'new-composite.json')
275275
```
@@ -278,8 +278,8 @@ This script will create a file named `new-composite.json` including model aliase
278278

279279
```jsx
280280
"aliases":{
281-
"kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc":"SimpleProfile",
282-
"kjzl6hvfrbw6c99mdfpjx1z3fue7sesgua6gsl1vu97229lq56344zu9bawnf96":"Post"
281+
"kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65":"SimpleProfile",
282+
"kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy":"Post"
283283
}
284284
```
285285

docs/composedb/guides/data-modeling/model-catalog.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ You will see a table where each model has the following metadata properties:
4646
Fetch a single model from the catalog and convert it into a composite, using its model ID:
4747

4848
```sh
49-
composedb composite:from-model kjzl6hvfrbw6c7keo17n66rxyo21nqqaa9lh491jz16od43nokz7ksfcvzi6bwc --output=my-composite.json
49+
composedb composite:from-model kjzl6hvfrbw6c5i55ks5m4hhyuh0jylw4g7x0asndu97i7luts4dfzvm35oev65 --output=my-composite.json
5050
```
5151

5252
### Using multiple models

docs/composedb/guides/data-modeling/relations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Here’s a model that allows many comments from the same or different account to
8383
```graphql
8484
# Load post model (using streamID)
8585

86-
type Post @loadModel(id: "kjzl6hvfrbw6c99mdfpjx1z3fue7sesgua6gsl1vu97229lq56344zu9bawnf96") {
86+
type Post @loadModel(id: "kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy") {
8787
id: ID!
8888
}
8989

@@ -120,7 +120,7 @@ type Comment @loadModel(id: "kjzl6hvfrbw6c9oo2ync09y6z5c9mas9u49lfzcowepuzxmcn3p
120120
# Set relationships to all comments and likes
121121
# Enable querying post to get all comments and likes
122122

123-
type Post @loadModel(id: "kjzl6hvfrbw6c99mdfpjx1z3fue7sesgua6gsl1vu97229lq56344zu9bawnf96") {
123+
type Post @loadModel(id: "kjzl6hvfrbw6c822s0cj1ug59spj648ml8a6mbqaz91wx8zx3mlwi76tfh3u1dy") {
124124
comments: [Comment] @relationFrom(model: "Comment", property: "postID")
125125
likes: [Like] @relationFrom(model: "Like", property: "postID")
126126
}

docs/composedb/set-up-your-environment.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ ceramic-one daemon
4343
```
4444

4545
:::note
46-
By default, the command above will spin off a node which connects to a `clay-testnet` network. You can change this behaviour by providing a `--network` flag and specifying a network of your choice. For example:
46+
By default, the command above will spin off a node which connects to a `testnet-clay` network. You can change this behaviour by providing a `--network` flag and specifying a network of your choice. For example:
4747

48-
```ceramic-one daemon --network clay-testnet```
48+
```ceramic-one daemon --network testnet-clay```
4949
:::
5050

5151

0 commit comments

Comments
 (0)