Skip to content

Commit

Permalink
Merge pull request #135 from dojoengine/graphql_models_name
Browse files Browse the repository at this point in the history
remove model_names from Graphql query
  • Loading branch information
ponderingdemocritus authored Dec 7, 2023
2 parents 8064d9d + f9040b7 commit d51a064
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
13 changes: 5 additions & 8 deletions src/cairo/hello-dojo.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ We covered a lot here in a short time. Let's recap:

- Explained the anatomy of a Dojo project
- Explained the importance of the `#[derive(Model)]`attribute
- Explained the `execute` function
- Explained the `Context` struct
- Explained the `spawn` and `move` functions
- Explained the `Moves` and `Position` struct
- Touched on the `get!` and `set!` commands

### Run it locally!
Expand Down Expand Up @@ -262,16 +262,16 @@ Your 🌎 is now deployed at `0x5010c31f127114c6198df8a5239e2b7a5151e1156fb43791

This establishes the world address for your project.

Let's discuss the `Scarb.toml` file in the project. This file contains environment variables that make running CLI commands in your project a breeze (read more about it [here](./config.md)). Make sure your file specifies the version of Dojo you have installed! In this case version `0.3.13`.
Let's discuss the `Scarb.toml` file in the project. This file contains environment variables that make running CLI commands in your project a breeze (read more about it [here](./config.md)). Make sure your file specifies the version of Dojo you have installed! In this case version `0.3.14`.

```toml
[dependencies]
dojo = { git = "https://github.com/dojoengine/dojo", version = "0.3.13" }
dojo = { git = "https://github.com/dojoengine/dojo", version = "0.3.14" }
```

### Indexing

With your local world address established, let's delve into indexing. You can index the entire world. To accomplish this we have to copy your world address from the output of `sozo migrate`. Now Open a new terminal and input this simple command that includes your own world address:
With your local world address established, let's delve into indexing. You can index the entire world. To accomplish this we have to copy your `world address` from the output of `sozo migrate`. Now Open a new terminal and input this simple command that includes your own world address:

```bash
torii --world 0x5010c31f127114c6198df8a5239e2b7a5151e1156fb43791e37e7385faa8138
Expand Down Expand Up @@ -337,7 +337,6 @@ subscription {
entityUpdated {
id
keys
model_names
event_id
created_at
updated_at
Expand Down Expand Up @@ -373,7 +372,6 @@ Now, go back to your GraphiQL IDE, and you will notice that you have received th
"keys": [
"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973"
],
"model_names": "Moves",
"event_id": "0x000000000000000000000000000000000000000000000000000000000000000b:0x0000:0x0000",
"created_at": "2023-10-18 06:53:12",
"updated_at": "2023-10-18 06:53:12"
Expand All @@ -388,7 +386,6 @@ Now, go back to your GraphiQL IDE, and you will notice that you have received th
"keys": [
"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973"
],
"model_names": "Moves,Position",
"event_id": "0x000000000000000000000000000000000000000000000000000000000000000b:0x0000:0x0001",
"created_at": "2023-10-18 06:53:12",
"updated_at": "2023-10-18 06:53:12"
Expand Down
2 changes: 0 additions & 2 deletions src/toolchain/torii/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ subscription {
) {
id
keys
model_names
event_id
created_at
updated_at
Expand Down Expand Up @@ -325,7 +324,6 @@ According to your input, you will receive an output like this:
"keys": [
"0x517ececd29116499f4a1b64b094da79ba08dfd54a3edaa316134c41f8160973"
],
"model_names": "Moves,Position",
"event_id": "0x0000000000000000000000000000000000000000000000000000000000000013:0x0000:0x0000",
"created_at": "2023-10-17 11:39:42",
"updated_at": "2023-10-17 11:52:48",
Expand Down

0 comments on commit d51a064

Please sign in to comment.