aws-amplify / aws-amplify/amplify-codegen
Custom mutation is not generating models on iOS
- Dominant language
- TypeScript
- Stars
- 59
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
### Before opening, please confirm:
- [X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
- [X] I have [searched for duplicate or closed issues](https://github.com/aws-amplify/amplify-cli/issues?q=is%3Aissue+).
- [X] I have read the guide for [submitting bug reports](https://github.com/aws-amplify/amplify-cli/blob/master/CONTRIBUTING.md#bug-reports).
- [X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
### How did you install the Amplify CLI?
npm
### If applicable, what version of Node.js are you using?
v15.5.1
### Amplify CLI Version
6.3.0
### What operating system are you using?
Mac
### Amplify Categories
auth, api
### Amplify Commands
codegen
### Describe the bug
When adding a custom mutation the amplify cli for iOS does not generate models for them.
### Expected behavior
I was expecting that models for all operations would be created automatically. The folder only contains models for `model`.
### Reproduction steps
1. Add a custom mutation
2. Apply the resolvers
3. Update the CustomResources.json
4. Push
### GraphQL schema(s)
```graphql
type Mutation {
batchCreateEvents(events: [CreateEventInput]): [Event]
}
type Event
@model
@auth(rules: [{ allow: owner, ownerField: "owner" }]) {
id: ID!
owner: String
}
```
### Log output
```
# Put your logs below this line
```
### Additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.