amplify-codegen
amplify-codegen copied to clipboard
Custom mutation is not generating models on iOS
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.
- [X] I have read the guide for submitting 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
- Add a custom mutation
- Apply the resolvers
- Update the CustomResources.json
- Push
GraphQL schema(s)
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
Transferring to the codegen team
Hi @maziarzamani,
Modelgen does not support generating models for custom models.
Hi @maziarzamani,
Modelgen does not support generating models for custom models.
I did realize that, however I was wondering if it was someting that could be implemented/requested?
Yes, we can log this as a feature request.
Thanks @dpilch
What is the workaround for this?