Skip to content

GraphQL API doesn't update optional values #800

Closed
@chris-mds

Description

@chris-mds

Describe the bug
Im trying to implement AppSync API and it doesn't update optional Values, when updating on the client app side.

To Reproduce
Steps to reproduce the behavior:

  1. Create a DataModel with optional fields
  2. Create on your app an item of this model with any optional key filled with value 'nil'
  3. Now we can see in our Table that this key is from type 'NULL' and his value is true.
  4. Now update on your app this key with the value it should be, when it is not nil. E.g. string.
  5. The Xcode console will show that the operation was successfull and the item was updated. But in the success data you can see, that this value wasn't updated
  6. Refresh the table and you will see, that nothing happened. The key is still from type 'NULL' and set to true

Expected behavior
Update the key with its given new value

Screenshots
Bildschirmfoto 2020-10-04 um 16 45 59
Bildschirmfoto 2020-10-04 um 16 45 20
Bildschirmfoto 2020-10-04 um 16 46 17

Environment(please complete the following information):

  • Dependency Manager: [ Cocoapods]
  • Swift Version : [ 5.3]

Device Information (please complete the following information):

  • Device: [Simulator]
  • iOS Version: [iOS 14]

Metadata

Metadata

Assignees

Labels

apiIssues related to the API categorypending-community-responseIssue is pending response from the issue requestorquestionGeneral question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions