Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update sample todo and todo-lists #3201

Merged
merged 1 commit into from
Jun 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 22 additions & 7 deletions docs/site/exposing-graphql-apis.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,28 @@ Here are some examples of the `query` and `mutation` calls:
The expected output looks like this:

```json
{ "data": { "todos": [
{ "id": 1, "title": "Take over the galaxy", "desc": "MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA" },
{ "id": 2, "title": "destroy alderaan", "desc": "Make sure there are no survivors left!" },
{"id": 3, "title": "terrorize senate", "desc": "Tell them they're getting a budget
cut." },
{ "id": 4, "title": "crush rebel scum", "desc": "Every.Last.One." }
] } }
{
"data": {
"todos": [
{
"id": 1,
"title": "Take over the galaxy",
"desc": "MWAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHA"
},
{
"id": 2,
"title": "destroy alderaan",
"desc": "Make sure there are no survivors left!"
},
{
"id": 3,
"title": "play space invaders",
"desc": "Become the very best!"
},
{"id": 4, "title": "crush rebel scum", "desc": "Every.Last.One."}
]
}
}
```

2. Create a to-do instance and retrieve its ID and title in the response object
Expand Down
2 changes: 1 addition & 1 deletion docs/site/tutorials/todo/todo-tutorial-datasource.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Create a `data` folder in the applications root and add a new file called
"Todo": {
"1": "{\"title\":\"Take over the galaxy\",\"desc\":\"MWAHAHAHAHAHAHAHAHAHAHAHAHAMWAHAHAHAHAHAHAHAHAHAHAHAHA\",\"id\":1}",
"2": "{\"title\":\"destroy alderaan\",\"desc\":\"Make sure there are no survivors left!\",\"id\":2}",
"3": "{\"title\":\"terrorize senate\",\"desc\":\"Tell them they're getting a budget cut.\",\"id\":3}",
"3": "{\"title\":\"play space invaders\",\"desc\":\"Become the very best!\",\"id\":3}",
"4": "{\"title\":\"crush rebel scum\",\"desc\":\"Every.Last.One.\",\"id\":4}"
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/todo-list/data/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
"Todo": {
"1": "{\"title\":\"Take over the galaxy\",\"desc\":\"MWAHAHAHAHAHAHAHAHAHAHAHAHAMWAHAHAHAHAHAHAHAHAHAHAHAHA\",\"todoListId\":1,\"id\":1}",
"2": "{\"title\":\"destroy alderaan\",\"desc\":\"Make sure there are no survivors left!\",\"todoListId\":1,\"id\":2}",
"3": "{\"title\":\"terrorize senate\",\"desc\":\"Tell them they're getting a budget cut.\",\"todoListId\":2,\"id\":3}",
"3": "{\"title\":\"play space invaders\",\"desc\":\"Become the very best!\",\"todoListId\":2,\"id\":3}",
"4": "{\"title\":\"crush rebel scum\",\"desc\":\"Every.Last.One.\",\"todoListId\":1,\"id\":4}"
},
"TodoList": {
"1": "{\"title\":\"Sith lord's check list\",\"lastModified\":\"a long time ago\",\"id\":1}",
"2": "{\"title\":\"daily routine of POTUS\",\"lastModified\":\"2018-07-13\",\"id\":2}"
"2": "{\"title\":\"My daily chores\",,\"lastModified\":\"2018-07-13\",\"id\":2}"
}
}
}
2 changes: 1 addition & 1 deletion examples/todo/data/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Todo": {
"1": "{\"title\":\"Take over the galaxy\",\"desc\":\"MWAHAHAHAHAHAHAHAHAHAHAHAHAMWAHAHAHAHAHAHAHAHAHAHAHAHA\",\"id\":1}",
"2": "{\"title\":\"destroy alderaan\",\"desc\":\"Make sure there are no survivors left!\",\"id\":2}",
"3": "{\"title\":\"terrorize senate\",\"desc\":\"Tell them they're getting a budget cut.\",\"id\":3}",
"3": "{\"title\":\"play space invaders\",\"desc\":\"Become the very best!\",\"id\":3}",
"4": "{\"title\":\"crush rebel scum\",\"desc\":\"Every.Last.One.\",\"id\":4}"
}
}
Expand Down