File tree 3 files changed +33
-3
lines changed
active-record/src/-private/builders
json-api/src/-private/builders
rest/src/-private/builders
3 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ function isExisting(identifier: StableRecordIdentifier): identifier is StableExi
34
34
* import { deleteRecord } from '@ember-data/active-record/request';
35
35
*
36
36
* const person = this.store.peekRecord('person', '1');
37
+ *
38
+ * // mark record as deleted
39
+ * store.deleteRecord(person);
40
+ *
41
+ * // persist deletion
37
42
* const data = await store.request(deleteRecord(person));
38
43
* ```
39
44
*
@@ -52,9 +57,14 @@ function isExisting(identifier: StableRecordIdentifier): identifier is StableExi
52
57
* - `urlParamsSetting` - an object containing options for how to serialize the query params (see `buildQueryParams`)
53
58
*
54
59
* ```ts
55
- * import { createRecord } from '@ember-data/active-record/request';
60
+ * import { deleteRecord } from '@ember-data/active-record/request';
56
61
*
57
62
* const person = this.store.peekRecord('person', '1');
63
+ *
64
+ * // mark record as deleted
65
+ * store.deleteRecord(person);
66
+ *
67
+ * // persist deletion
58
68
* const options = deleteRecord(person, { namespace: 'api/v1' });
59
69
* const data = await store.request(options);
60
70
* ```
Original file line number Diff line number Diff line change @@ -33,6 +33,11 @@ function isExisting(identifier: StableRecordIdentifier): identifier is StableExi
33
33
* import { deleteRecord } from '@ember-data/json-api/request';
34
34
*
35
35
* const person = this.store.peekRecord('person', '1');
36
+ *
37
+ * // mark record as deleted
38
+ * store.deleteRecord(person);
39
+ *
40
+ * // persist deletion
36
41
* const data = await store.request(deleteRecord(person));
37
42
* ```
38
43
*
@@ -51,9 +56,14 @@ function isExisting(identifier: StableRecordIdentifier): identifier is StableExi
51
56
* - `urlParamsSetting` - an object containing options for how to serialize the query params (see `buildQueryParams`)
52
57
*
53
58
* ```ts
54
- * import { createRecord } from '@ember-data/json-api/request';
59
+ * import { deleteRecord } from '@ember-data/json-api/request';
55
60
*
56
61
* const person = this.store.peekRecord('person', '1');
62
+ *
63
+ * // mark record as deleted
64
+ * store.deleteRecord(person);
65
+ *
66
+ * // persist deletion
57
67
* const options = deleteRecord(person, { namespace: 'api/v1' });
58
68
* const data = await store.request(options);
59
69
* ```
Original file line number Diff line number Diff line change @@ -34,6 +34,11 @@ function isExisting(identifier: StableRecordIdentifier): identifier is StableExi
34
34
* import { deleteRecord } from '@ember-data/rest/request';
35
35
*
36
36
* const person = this.store.peekRecord('person', '1');
37
+ *
38
+ * // mark record as deleted
39
+ * store.deleteRecord(person);
40
+ *
41
+ * // persist deletion
37
42
* const data = await store.request(deleteRecord(person));
38
43
* ```
39
44
*
@@ -52,9 +57,14 @@ function isExisting(identifier: StableRecordIdentifier): identifier is StableExi
52
57
* - `urlParamsSetting` - an object containing options for how to serialize the query params (see `buildQueryParams`)
53
58
*
54
59
* ```ts
55
- * import { createRecord } from '@ember-data/rest/request';
60
+ * import { deleteRecord } from '@ember-data/rest/request';
56
61
*
57
62
* const person = this.store.peekRecord('person', '1');
63
+ *
64
+ * // mark record as deleted
65
+ * store.deleteRecord(person);
66
+ *
67
+ * // persist deletion
58
68
* const options = deleteRecord(person, { namespace: 'api/v1' });
59
69
* const data = await store.request(options);
60
70
* ```
You can’t perform that action at this time.
0 commit comments