-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Delete Blog Input has ID (primary key) string or null or undefined with typescript. #128
Comments
make primary key non nullable on delete input fix #2564
Currently the tranformer generates nullable ID field in delete input. This issue will be fixed by aws-amplify/amplify-cli#6337. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Its been couple of years since I opened this issue. Also I no longer use graphql for mutation instead I use HTTP API and lambda. I feel the power of graphql is in querying related data NOT for single mutation like delete or post or update. And nobody else has this issue only I had this issue so I will close it now. |
Describe the bug
A clear and concise description of what the bug is.
After generating typescript code for simple schema Blog has id (string) & title (string). In API.ts you find following code
How it's possible to delete blog with undefined or null id. However at AppSync console with graphiql it is showing that id (string) is required to delete note.
I deleted API and created again few times & also generated code with amplify codegen
To Reproduce
Steps to reproduce the behavior:
create react app
amplify init
amplify add api
schema is simple
amplify push
Expected behavior
I would expect to have following generated code
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: