Commit 5bd3e65
authored
DataStore.save() with condition (#355)
* Adding condition to save()
* Adding condition to save()
* Add predicate to mutation event
* QueryPredicate Codable conformance
* add ingestor disposition logic
* test for conditional request failed
* Add ProcessMutationErrorFromCloudOperation to check when there is a successful responnse with graphql errors. If the graphQL error is conditional failed, then retrieve the latest remote model, and apply it to local storage.
* Adding simple AnyQueryPredicate test
* - Moved delete mutation event out of SyncMutationToCloudOperation to after possibly exeuction of ProcessMutationErrorFromCloudOperation.
- Added unit test for ProcessMutationErrorFromCloudOperation
* Add E2E test for conditional save failed
* minor changes
- AnyModelTester class rename
- unit test parallelization fix
- add correct error from StorageEngine for save()
* Removed Codable conformance for QueryPredicate and serialize graphQL version of QueryPredicate into JSON string
* remove fetch and save when processing conditional save failed
* clean up, api tests, plugin core tests
* minor comment update
* Code clean up - use GraphQLFilter typealias, 'JSON' casing, DataStore error naming, removed QueryPredicateInput, updated MutationEvent's field as graphQLFiilterJSON
* rename parameter to `filter`
* Move GraphQLFilter serialization under GraphQLFilterConverter1 parent 1c2bd06 commit 5bd3e65
File tree
56 files changed
+1179
-188
lines changed- Amplify.xcodeproj
- AmplifyPlugins
- API
- AWSAPICategoryPluginFunctionalTests/GraphQLSyncBased
- AWSAPICategoryPlugin/Support/Utils
- Core
- AWSPluginsCoreTests/Model
- GraphQLDocument
- GraphQLRequest
- Support
- AWSPluginsCore/Model
- Decorator
- GraphQLRequest
- Support
- DataStore
- AWSDataStoreCategoryPluginIntegrationTests
- TestSupport
- AWSDataStoreCategoryPluginTests
- Core
- Sync
- MutationQueue
- SubscriptionSync
- Support
- TestSupport/Mocks
- AWSDataStoreCategoryPlugin
- Storage
- SQLite
- Sync
- InitialSync
- MutationSync
- AWSMutationDatabaseAdapter
- OutgoingMutationQueue
- SubscriptionSync/ReconcileAndLocalSave
- DataStoreCategoryPlugin.xcodeproj
- AmplifyTestCommon/Mocks
- AmplifyTests/CategoryTests/DataStore
- Support
- Amplify/Categories/DataStore
- Query
- Subscribe
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
56 files changed
+1179
-188
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| |||
568 | 569 | | |
569 | 570 | | |
570 | 571 | | |
571 | | - | |
| 572 | + | |
572 | 573 | | |
573 | 574 | | |
574 | 575 | | |
| |||
580 | 581 | | |
581 | 582 | | |
582 | 583 | | |
| 584 | + | |
583 | 585 | | |
584 | 586 | | |
585 | 587 | | |
| |||
1338 | 1340 | | |
1339 | 1341 | | |
1340 | 1342 | | |
1341 | | - | |
| 1343 | + | |
1342 | 1344 | | |
1343 | 1345 | | |
1344 | 1346 | | |
1345 | 1347 | | |
| 1348 | + | |
| 1349 | + | |
| 1350 | + | |
| 1351 | + | |
| 1352 | + | |
| 1353 | + | |
| 1354 | + | |
| 1355 | + | |
1346 | 1356 | | |
1347 | 1357 | | |
1348 | 1358 | | |
| |||
2574 | 2584 | | |
2575 | 2585 | | |
2576 | 2586 | | |
| 2587 | + | |
2577 | 2588 | | |
2578 | | - | |
2579 | 2589 | | |
2580 | 2590 | | |
| 2591 | + | |
2581 | 2592 | | |
2582 | 2593 | | |
2583 | 2594 | | |
| |||
3482 | 3493 | | |
3483 | 3494 | | |
3484 | 3495 | | |
3485 | | - | |
| 3496 | + | |
3486 | 3497 | | |
3487 | 3498 | | |
3488 | 3499 | | |
| |||
3829 | 3840 | | |
3830 | 3841 | | |
3831 | 3842 | | |
| 3843 | + | |
3832 | 3844 | | |
3833 | 3845 | | |
3834 | 3846 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| |||
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| 91 | + | |
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
| 42 | + | |
41 | 43 | | |
42 | 44 | | |
43 | 45 | | |
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
47 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
56 | 61 | | |
57 | 62 | | |
58 | 63 | | |
| |||
0 commit comments