aws-amplify / amplify-swift

A declarative library for application development using cloud services.
Apache License 2.0
447 stars 193 forks source link

GraphQL operation .get not supported in Swift #3038

Open ChadyG opened 1 year ago

ChadyG commented 1 year ago

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.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_
royjit commented 1 year ago

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.

github-actions[bot] commented 4 months ago

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!