Skip to content

Commit 99d3aa0

Browse files
committed
fix: update sample todo and todo-lists
1 parent 8ae8a0a commit 99d3aa0

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

docs/site/exposing-graphql-apis.md

+22-7
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,28 @@ Here are some examples of the `query` and `mutation` calls:
8080
The expected output looks like this:
8181

8282
```json
83-
{ "data": { "todos": [
84-
{ "id": 1, "title": "Take over the galaxy", "desc": "MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA" },
85-
{ "id": 2, "title": "destroy alderaan", "desc": "Make sure there are no survivors left!" },
86-
{"id": 3, "title": "terrorize senate", "desc": "Tell them they're getting a budget
87-
cut." },
88-
{ "id": 4, "title": "crush rebel scum", "desc": "Every.Last.One." }
89-
] } }
83+
{
84+
"data": {
85+
"todos": [
86+
{
87+
"id": 1,
88+
"title": "Take over the galaxy",
89+
"desc": "MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA"
90+
},
91+
{
92+
"id": 2,
93+
"title": "destroy alderaan",
94+
"desc": "Make sure there are no survivors left!"
95+
},
96+
{
97+
"id": 3,
98+
"title": "play space invaders",
99+
"desc": "Become the very best!"
100+
},
101+
{"id": 4, "title": "crush rebel scum", "desc": "Every.Last.One."}
102+
]
103+
}
104+
}
90105
```
91106

92107
2. Create a to-do instance and retrieve its ID and title in the response object

docs/site/tutorials/todo/todo-tutorial-datasource.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Create a `data` folder in the applications root and add a new file called
6060
"Todo": {
6161
"1": "{\"title\":\"Take over the galaxy\",\"desc\":\"MWAHAHAHAHAHAHAHAHAHAHAHAHAMWAHAHAHAHAHAHAHAHAHAHAHAHA\",\"id\":1}",
6262
"2": "{\"title\":\"destroy alderaan\",\"desc\":\"Make sure there are no survivors left!\",\"id\":2}",
63-
"3": "{\"title\":\"terrorize senate\",\"desc\":\"Tell them they're getting a budget cut.\",\"id\":3}",
63+
"3": "{\"title\":\"play space invaders\",\"desc\":\"Become the very best!\",\"id\":3}",
6464
"4": "{\"title\":\"crush rebel scum\",\"desc\":\"Every.Last.One.\",\"id\":4}"
6565
}
6666
}

examples/todo-list/data/db.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"Todo": {
88
"1": "{\"title\":\"Take over the galaxy\",\"desc\":\"MWAHAHAHAHAHAHAHAHAHAHAHAHAMWAHAHAHAHAHAHAHAHAHAHAHAHA\",\"todoListId\":1,\"id\":1}",
99
"2": "{\"title\":\"destroy alderaan\",\"desc\":\"Make sure there are no survivors left!\",\"todoListId\":1,\"id\":2}",
10-
"3": "{\"title\":\"terrorize senate\",\"desc\":\"Tell them they're getting a budget cut.\",\"todoListId\":2,\"id\":3}",
10+
"3": "{\"title\":\"play space invaders\",\"desc\":\"Become the very best!\",\"todoListId\":2,\"id\":3}",
1111
"4": "{\"title\":\"crush rebel scum\",\"desc\":\"Every.Last.One.\",\"todoListId\":1,\"id\":4}"
1212
},
1313
"TodoList": {
1414
"1": "{\"title\":\"Sith lord's check list\",\"lastModified\":\"a long time ago\",\"id\":1}",
15-
"2": "{\"title\":\"daily routine of POTUS\",\"lastModified\":\"2018-07-13\",\"id\":2}"
15+
"2": "{\"title\":\"My daily chores\",,\"lastModified\":\"2018-07-13\",\"id\":2}"
1616
}
1717
}
1818
}

examples/todo/data/db.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"Todo": {
77
"1": "{\"title\":\"Take over the galaxy\",\"desc\":\"MWAHAHAHAHAHAHAHAHAHAHAHAHAMWAHAHAHAHAHAHAHAHAHAHAHAHA\",\"id\":1}",
88
"2": "{\"title\":\"destroy alderaan\",\"desc\":\"Make sure there are no survivors left!\",\"id\":2}",
9-
"3": "{\"title\":\"terrorize senate\",\"desc\":\"Tell them they're getting a budget cut.\",\"id\":3}",
9+
"3": "{\"title\":\"play space invaders\",\"desc\":\"Become the very best!\",\"id\":3}",
1010
"4": "{\"title\":\"crush rebel scum\",\"desc\":\"Every.Last.One.\",\"id\":4}"
1111
}
1212
}

0 commit comments

Comments
 (0)