You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _includes/android/objects.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,15 @@ gameScore.saveInBackground();
28
28
29
29
After this code runs, you will probably be wondering if anything really happened. To make sure the data was saved, you can look at the Data Browser in your app on Parse. You should see something like this:
There are two things to note here. You didn't have to configure or set up a new Class called `GameScore` before running this code. Your Parse app lazily creates this Class for you when it first encounters it.
Copy file name to clipboardExpand all lines: _includes/arduino/objects.md
+9-2
Original file line number
Diff line number
Diff line change
@@ -35,8 +35,15 @@ response.close(); // Free the resource
35
35
36
36
After this code runs, you will probably be wondering if anything really happened. To make sure the data was saved, you can look at the Data Browser in your app on Parse. You should see something like this:
There are two things to note here. You didn't have to configure or set up a new Class called `Temperature` before running this code. Your Parse app lazily creates this Class for you when it first encounters it.
Copy file name to clipboardExpand all lines: _includes/cloudcode/cloud-code-advanced.md
+11-11
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ end
206
206
207
207
Here's an example of the JSON data that would be sent in the request to this webhook:
208
208
209
-
```json
209
+
```jsonc
210
210
// Sent to webhook
211
211
{
212
212
"master":false,
@@ -225,14 +225,14 @@ Here's an example of the JSON data that would be sent in the request to this web
225
225
226
226
This response would indicate a success in the webhook:
227
227
228
-
```json
228
+
```jsonc
229
229
// Returned from the webhook on success
230
230
{ "success":"Hello World!" }
231
231
```
232
232
233
233
This response would indicate an error in the webhook:
234
234
235
-
```json
235
+
```jsonc
236
236
// Returned from the webhook on error
237
237
{ "error":"Error message >:(" }
238
238
```
@@ -275,7 +275,7 @@ end
275
275
276
276
Here's an example of the JSON data that would be sent in the request to this webhook:
277
277
278
-
```json
278
+
```jsonc
279
279
// Sent to webhook
280
280
{
281
281
"master":true,
@@ -287,7 +287,7 @@ Here's an example of the JSON data that would be sent in the request to this web
287
287
288
288
This response would indicate a success in the webhook:
289
289
290
-
```json
290
+
```jsonc
291
291
// Returned from the webhook on success
292
292
{ "success":"User billed!" }
293
293
```
@@ -310,7 +310,7 @@ For triggers, the following parameters are sent to your webhook.
310
310
311
311
To respond to a `beforeSave` request, send a JSON object with the key `error` or `success` set. This is the same as for Cloud functions, but there's an extra capability with `beforeSave` triggers. By returning an error, you will cancel the save request and the object will not be stored on Parse. You can also return a JSON object in this following format to override the values that will be saved for the object:
312
312
313
-
```json
313
+
```jsonc
314
314
{
315
315
"className":"AwesomeClass",
316
316
"existingColumn":"sneakyChange",
@@ -348,7 +348,7 @@ end
348
348
349
349
Here's an example of the JSON data that would be sent in the request to this webhook:
350
350
351
-
```json
351
+
```jsonc
352
352
// Sent to webhook
353
353
{
354
354
"master":false,
@@ -419,7 +419,7 @@ end
419
419
420
420
Here's an example of the JSON data that would be sent in the request to this webhook:
421
421
422
-
```json
422
+
```jsonc
423
423
// Sent to webhook
424
424
{
425
425
"master":false,
@@ -485,7 +485,7 @@ end
485
485
486
486
Here's an example of the JSON data that would be sent in the request to this webhook:
487
487
488
-
```json
488
+
```jsonc
489
489
// Sent to webhook
490
490
{
491
491
"master":false,
@@ -509,7 +509,7 @@ Here's an example of the JSON data that would be sent in the request to this web
509
509
510
510
This response would indicate a success in the webhook:
511
511
512
-
```json
512
+
```jsonc
513
513
// Returned from the webhook on success
514
514
{ "success":true }
515
515
```
@@ -554,7 +554,7 @@ end
554
554
555
555
Here's an example of the JSON data that would be sent in the request to this webhook:
Copy file name to clipboardExpand all lines: _includes/cloudcode/cloud-code.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
Let's look at a slightly more complex example where Cloud Code is useful. One reason to do computation in the cloud is so that you don't have to send a huge list of objects down to a device if you only want a little bit of information. For example, let's say you're writing an app that lets people review movies. A single `Review` object could look like:
4
4
5
-
```json
5
+
```jsonc
6
6
{
7
7
"movie":"The Matrix",
8
8
"stars":5,
@@ -112,13 +112,13 @@ In general, two arguments will be passed into cloud functions:
112
112
113
113
If the function is successful, the response in the client looks like:
114
114
115
-
```json
115
+
```jsonc
116
116
{ "result":4.8 }
117
117
```
118
118
119
119
If there is an error, the response in the client looks like:
Copy file name to clipboardExpand all lines: _includes/common/data.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ You may import data into your Parse app by using CSV or JSON files. To create a
36
36
37
37
The JSON format is an array of objects in our REST format or a JSON object with a `results` that contains an array of objects. It must adhere to the [JSON standard](http://json.org/). A file containing regular objects could look like:
38
38
39
-
```js
39
+
```jsonc
40
40
{ "results": [
41
41
{
42
42
"score":1337,
@@ -63,7 +63,7 @@ In addition to the exposed fields, objects in the Parse User class can also have
63
63
64
64
A file containing a `User` object could look like:
Copy file name to clipboardExpand all lines: _includes/common/security.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -389,7 +389,7 @@ All this is just the beginning. Applications can enforce all sorts of complex ac
389
389
390
390
For the curious, here's the format for an ACL that restricts read and write permissions to the owner (whose `objectId` is identified by `"aSaMpLeUsErId"`) and enables other users to read the object:
391
391
392
-
```json
392
+
```jsonc
393
393
{
394
394
"*": { "read":true },
395
395
"aSaMpLeUsErId": { "read":true, "write":true }
@@ -398,7 +398,7 @@ For the curious, here's the format for an ACL that restricts read and write perm
398
398
399
399
And here's another example of the format of an ACL that uses a Role:
400
400
401
-
```json
401
+
```jsonc
402
402
{
403
403
"role:RoleName": { "read":true },
404
404
"aSaMpLeUsErId": { "read":true, "write":true }
@@ -413,7 +413,7 @@ Given that objects often already have pointers to the user(s) that should have p
413
413
414
414
Pointer permissions are like virtual ACLs. They don't appear in the ACL column, but if you are familiar with how ACLs work, you can think of them like ACLs. In the above example with the `sender` and `receiver`, each object will act as if it has an ACL of:
Copy file name to clipboardExpand all lines: _includes/dotnet/objects.md
+9-3
Original file line number
Diff line number
Diff line change
@@ -28,9 +28,15 @@ await gameScore.SaveAsync();
28
28
29
29
After this code runs, you will probably be wondering if anything really happened. To make sure the data was saved, you can look at the Data Browser in your app on Parse. You should see something like this:
There are two things to note here. You didn't have to configure or set up a new Class called `GameScore` before running this code. Your Parse app lazily creates this Class for you when it first encounters it.
Copy file name to clipboardExpand all lines: _includes/graphql/classes.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Classes
2
2
3
3
Since your application does not have a schema yet, you can use the `createClass` mutation to create your first class through the GraphQL API. Run the following:
@@ -133,7 +133,7 @@ By default, we enrich the schema by generating a number of [Input Types](https:/
133
133
134
134
In the following example, we have a custom class called `Review` where the fields `rating` and `body` are allowed on the `create` mutation, and the field `numberOfLikes` on the `update` mutation:
135
135
136
-
```javascript
136
+
```jsonc
137
137
{
138
138
"classConfigs": [
139
139
{
@@ -151,7 +151,7 @@ In the following example, we have a custom class called `Review` where the field
151
151
152
152
You may decide to restrict which fields can be resolved when getting or finding records from a given class, for example, if you have a class called `Video` which includes a sensitive field `dmcaFlags`, you can hide this field by explicitly stating the fields that can be resolved:
153
153
154
-
```javascript
154
+
```jsonc
155
155
{
156
156
"classConfigs": [
157
157
{
@@ -169,7 +169,7 @@ In production-grade environments where performance optimisation is critical, com
169
169
170
170
In the following example, we set the fields `name` and `age` as the only two that can be used to filter the `_User` class, and defining the `createdAt` and `age` fields the only sortable field whilst disabling the ascending direction on the `createdAt` field:
171
171
172
-
```javascript
172
+
```jsonc
173
173
{
174
174
"classConfigs": [
175
175
{
@@ -199,7 +199,7 @@ In the following example, we set the fields `name` and `age` as the only two tha
199
199
By default, the schema exposes a `get` and `find` operation for each class, for example, `get_User` and `find_User`. You can disable either of these for any class in your schema, like so:
200
200
201
201
202
-
```javascript
202
+
```jsonc
203
203
{
204
204
"classConfigs": [
205
205
{
@@ -222,7 +222,7 @@ By default, the schema exposes a `get` and `find` operation for each class, for
222
222
223
223
By default, generated query names use pluralized version of `className`. You can override this behaviour with `getAlias`/`findAlias`. This is useful when your collection is named in plural or when singular/plural forms are same e.g. `Data`:
224
224
225
-
```javascript
225
+
```jsonc
226
226
{
227
227
"classConfigs": [
228
228
{
@@ -246,7 +246,7 @@ By default, generated query names use pluralized version of `className`. You can
246
246
By default, the schema exposes a `create`, `update` and `delete` operation for each class, for example, `create_User`, `update_User` and `delete_User`. You can disable any of these mutations for any class in your schema, like so:
247
247
248
248
249
-
```javascript
249
+
```jsonc
250
250
{
251
251
"classConfigs": [
252
252
{
@@ -273,7 +273,7 @@ By default, the schema exposes a `create`, `update` and `delete` operation for e
273
273
274
274
You can optionally override the default generated mutation names with aliases:
0 commit comments