There's no constant named 'GET' in ModelOperation constants #2526
Labels
feature-parity
A request for a feature that is fully or partially available on another platform (JS, iOS, Android)
feature-request
A request for a new feature or an enhancement to an existing API or category.
GraphQL API
Issues related to the API (GraphQL) Category
Description
The documentation describes the
@auth
directive as supporting the following operationsDocs: Authorization rules
I get an error of
Error: Member not found: 'GET'.
when trying to build with models generated from a schema with a directive such as@auth(rules: [{allow: owner, operations: [get]}])
Looking at the source for the package the granular read operations are not available.
enum ModelOperation { CREATE, UPDATE, DELETE, READ }
(src: packages/amplify_core/lib/src/types/models/auth_rule.dart)Categories
Steps to Reproduce
@auth(rules: [{allow: owner, operations: [get]}])
or any of the granular read operationsamplify codegen models
flutter run
Screenshots
VS Code Error
Error in terminal
Platforms
Android Device/Emulator API Level
API 27
Environment
Dependencies
Device
iPhone 12
OS
macOS 13.1
Deployment Method
Amplify CLI
CLI Version
10.5.2
Additional Context
No response
Amplify Config
The text was updated successfully, but these errors were encountered: