amplify-swift
amplify-swift copied to clipboard
GraphQL operation .get not supported in Swift
Describe the bug
Starting to switch over to transform v2 in order to get at some of the new features, including finer controls on authorized read operations in our GraphQL API. Using the get specifier in the GraphQL, but after running codegen I'm getting the following error.
Type 'Array<ModelOperation>.ArrayLiteralElement' (aka 'ModelOperation') has no member 'get'
Steps To Reproduce
Steps to reproduce the behavior:
1. Specify some auth rules that allow only .get operations on your model/field
2. Run codegen models
3. Compile in Xcode
Expected behavior
No compile issues
Amplify Framework Version
1.30.2
Amplify Categories
API
Dependency manager
Cocoapods
Swift version
5.0
CLI version
12.1.1
Xcode version
14.3.1
Relevant log output
<details>
<summary>Log Messages</summary>
Type 'Array<ModelOperation>.ArrayLiteralElement' (aka 'ModelOperation') has no member 'get'
```
Is this a regression?
No
Regression additional context
No response
Device
iPhone 13 Pro
iOS Version
16.5
Specific to simulators
No response
Additional context
No response
Thank you for raising this issue. We have a PR that solves this library issue - https://github.com/aws-amplify/amplify-swift/pull/2720
Will update here when we have the PR released.
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!