amplify-flutter icon indicating copy to clipboard operation
amplify-flutter copied to clipboard

Better developer experience when using API plugin to operate data managed by DataStore

Open HuiSF opened this issue 2 years ago • 2 comments

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.

  1. 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.
  2. API plugin and GraphQL helper should support use cases when enabling conflict detection even when DataStore is not used
  3. 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
  4. Configuring conflict detection and resolution strategies per model not per API
  5. 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.
  6. 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 https://github.com/aws-amplify/amplify-android/issues/1574)

Categories

  • [ ] Analytics
  • [ ] API (REST)
  • [X] API (GraphQL)
  • [ ] Auth
  • [ ] Authenticator
  • [X] DataStore
  • [ ] Storage

Steps to Reproduce

No response

Screenshots

No response

Platforms

  • [X] iOS
  • [X] 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

HuiSF avatar Aug 01 '22 15:08 HuiSF

This ticket still being worked on?

adplant avatar Nov 01 '23 01:11 adplant

Are there any updates? Can the _version field be added manually, or will this cause other issues?

thomasklaush avatar Jan 22 '24 05:01 thomasklaush