-
Notifications
You must be signed in to change notification settings - Fork 63
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: add modelgen support for granular read ops #537
Conversation
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #537 +/- ##
=======================================
Coverage 85.69% 85.69%
=======================================
Files 148 148
Lines 7380 7380
Branches 1962 1962
=======================================
Hits 6324 6324
Misses 959 959
Partials 97 97
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
list: 'ModelOperation.LIST', | ||
sync: 'ModelOperation.SYNC', | ||
listen: 'ModelOperation.LISTEN', | ||
search: 'ModelOperation.SEARCH', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we changing the behavior for only appsync-java-visitor
or all other visitors as well? I assume this generateAuthRules
method is common to all visitors? If that's the case, can we move this to a common visitor? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for java visitor only. It maps the input operation to the library-defined enum value. If not added here, the code in java will be generated as empty string.
For the other code generators, these ops will be simply parsed and generated in the final code and do not need additional mapping. You can see this in the snapshot changes for other visitors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Swift: https://github.com/aws-amplify/amplify-codegen/pull/537/files#diff-b728b3bfd6e02d0683386efa2a8a74b95cc6f624d5f450db27764fe7edfac671R53-R55
- JS: https://github.com/aws-amplify/amplify-codegen/pull/537/files#diff-cc6588d1d5a98c0aba946398191679c0e2c1dbc8cc27d0c8b61e1a6d10cf34eeR2781-R2797
- Flutter: https://github.com/aws-amplify/amplify-codegen/pull/537/files#diff-38d85adcb8cc38618dae4676dc8ef3ae8c13ecf2fc73bbb00ce96519e7cbe2c6R3109-R3115
Description of changes
Added granular modelgen support for Java
For the other libraries, the generated code has no problem and only library support is needed
Issue #, if available
aws-amplify/amplify-flutter#2526
Description of how you validated changes
Checklist
yarn test
passesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.