Skip to content

GraphQL operation .get not supported in Swift #3038

Open
@ChadyG

Description

@ChadyG

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiIssues related to the API categoryfeature-requestRequest a new featurerequires attentionFollow up needed for more than 10 dayswork in progressIssues was triaged and investigation done

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions