Skip to content

Update GraphQL Docs with the latest changes #5980

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

Merged
merged 1 commit into from
Aug 27, 2019
Merged
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
68 changes: 28 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -510,11 +510,9 @@ Since your application does not have a schema yet, you can use the generic `crea

```graphql
mutation CreateObject {
objects {
create(className: "GameScore" fields: { score: 1337 playerName: "Sean Plott" cheatMode: false }) {
objectId
createdAt
}
create(className: "GameScore" fields: { score: 1337 playerName: "Sean Plott" cheatMode: false }) {
objectId
createdAt
}
}
```
Expand All @@ -524,11 +522,9 @@ You should receive a response similar to this:
```json
{
"data": {
"objects": {
"create": {
"objectId": "7jfBmbGgyF",
"createdAt": "2019-06-20T23:50:50.825Z"
}
"create": {
"objectId": "CVuh0o0ioY",
"createdAt": "2019-08-27T06:35:15.641Z"
}
}
}
Expand All @@ -542,11 +538,9 @@ Run the following to create a second object:

```graphql
mutation CreateGameScore {
objects {
createGameScore(fields: { score: 2558 playerName: "Luke Skywalker" cheatMode: false }) {
objectId
createdAt
}
createGameScore(fields: { score: 2558 playerName: "Luke Skywalker" cheatMode: false }) {
objectId
createdAt
}
}
```
Expand All @@ -556,11 +550,9 @@ You should receive a response similar to this:
```json
{
"data": {
"objects": {
"createGameScore": {
"objectId": "gySYolb2CL",
"createdAt": "2019-06-20T23:56:37.114Z"
}
"createGameScore": {
"objectId": "XyvErLoJ2O",
"createdAt": "2019-08-27T06:37:32.078Z"
}
}
}
Expand All @@ -569,13 +561,11 @@ You should receive a response similar to this:
You can also run a query to this new class:

```graphql
query FindGameScore {
objects {
findGameScore {
results {
playerName
score
}
query GameScores {
gameScores {
results {
playerName
score
}
}
}
Expand All @@ -586,19 +576,17 @@ You should receive a response similar to this:
```json
{
"data": {
"objects": {
"findGameScore": {
"results": [
{
"playerName": "Sean Plott",
"score": 1337
},
{
"playerName": "Luke Skywalker",
"score": 2558
}
]
}
"gameScores": {
"results": [
{
"playerName": "Sean Plott",
"score": 1337
},
{
"playerName": "Luke Skywalker",
"score": 2558
}
]
}
}
}
Expand Down