Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(amplify-codegen): fix for non-model decoding in flutter v1 #843

Merged
merged 1 commit into from
May 15, 2024

Conversation

Equartey
Copy link
Contributor

Description of changes

Added the dropped Flutter V1 Model.fromJson() decoding logic back to non-model embeds. Customer observed embedded non-model types not populating values after requests were made. This adds a fallback to previous logic.

Issue #, if available

aws-amplify/amplify-flutter#4872

Description of how you validated changes

Validated decoding against this schema in both Flutter V1 and V2.

type MyModel @model @auth(rules: [{ allow: owner }]) {
  id: ID!
  owner: String
  token: Token
  tokens: [Token]
}

type Token {
  externalId: String!
  value: String!
}

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Changes are tested using sample applications for all relevant platforms (iOS/android/flutter/Javascript) that use the feature added/modified

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dpilch dpilch merged commit 0ffe64f into main May 15, 2024
4 checks passed
@dpilch dpilch deleted the fix/dart-non-model-fromjson-v1 branch May 15, 2024 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants