Repository: aws-amplify/amplify-flutter

Issue #1945: Better developer experience when using API plugin to operate data managed by DataStore
Created: 2022-08-01T15:57:22Z
Description
This is an aggregated feature request tracking issue for use cases of using API plugin to operate DataStore.
Please refer to the linked issues below to see the original feature requests.
Thanks everyone for providing your feedback and requests.

DataStore codegen models should support conflict detection meta fields _deleted, _lastChangedAt and _version
DataStore requires enabling conflict detection while configuring API category. Conflict detection adds three aforementioned meta fields into GraphQL schema. These meta fields are currently hidden from codegen generated model, hence, the API plugin GraphQL helper cannot generate a selection set including these mandatory fields, which requires developers to manually create GraphQL document.
API plugin and GraphQL helper should support use cases when enabling conflict detection even when DataStore is not used
DataStore should support "partial" selection set with subscription, so when using API plugin to mutate data with a subset of model fields listed in the selection set, DataStore can still receive a subscription event correctly
Configuring conflict detection and resolution strategies per model not per API
Amplify API plugin supports use case that operating on multiple REST or GraphQL APIs, however, DataStore throws exception and reject to sync when multiple GraphQL APIs are listed in amplifyconfiguration.dart.  In this case, DataStore should be able to pick appropriate GraphQL endpoint for its sync engine.
AppSync supports dynamic group authorization with limitations on real-time subscriptions. As a developer I'd like to use dynamic group auth for some use cases, but it somehow breaks DataStore functionality. I want the DataStore can still function when I'm applying dynamic group auth to some models. (related to aws-amplify/amplify-android#1574)

Categories

 Analytics
 API (REST)
 API (GraphQL)
 Auth
 Authenticator
 DataStore
 Storage

Steps to Reproduce
No response
Screenshots
No response
Platforms

 iOS
 Android

Android Device/Emulator API Level
No response
Environment
N/A
Dependencies
N/A
Device
N/A
OS
N/A
CLI Version
N/A
Additional Context
No response

Duplicate issue #3325: Datastor and API (GraphQL) for App and WebApp combination not working
Created: 2023-06-30T04:41:34Z
Description
If mobile App is used, Datastore is preferred.
For Web Applications, Datastore is not usable, so API (GraphQL) is necessary.

Conflict detection: Since _version is not aces sable, conflict detection is not working with API (GraphQL)
Deletion: Since _deleted flag is not aces sable from API and not usable in queries, all not expired ttl objects ar still visible
@manytomany Auth (@manytomany(relationName: "RelationClass") ): For this, no groups (@model @auth(rules: [{ allow: private, operations: [read] },{ allow: groups, groupsField: "groups" }) field are constructed for RelationClass and so cannot be used.

Categories

 Analytics
 API (REST)
 API (GraphQL)
 Auth
 Authenticator
 DataStore
 Notifications (Push)
 Storage

Steps to Reproduce
No response
Screenshots
No response
Platforms

 iOS
 Android
 Web
 macOS
 Windows
 Linux

Flutter Version
3.10.5
Amplify Flutter Version
1.2.0
Deployment Method
Amplify CLI
Schema
No response

Closing comment (2023-07-14T19:11:30Z): @thomasklaush I will close this as duplicate. please comment on #1945 to let us know about your specific use case.
Duplicate of #1945