amplify-category-api
amplify-category-api copied to clipboard
Custom Mutation/Query functions are not showing up under the client type
Environment information
System:
OS: macOS 13.6.6
CPU: (10) arm64 Apple M1 Pro
Memory: 167.00 MB / 16.00 GB
Shell: /bin/zsh
Binaries:
Node: 20.10.0 - /usr/local/bin/node
Yarn: 1.22.22 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: undefined - undefined
NPM Packages:
@aws-amplify/backend: 0.13.0
@aws-amplify/backend-cli: 0.12.0
aws-amplify: 6.0.28
aws-cdk: Not Found
aws-cdk-lib: 2.138.0
typescript: 5.4.5
AWS environment variables:
AWS_STS_REGIONAL_ENDPOINTS = regional
AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables
Description
When adding custom mutations/queries to the schema, their types do not appear under client.mutations or client.queries. They still work, when you call on them, however the types are not there which causes TypeScript errors. This occurred after I updated from amplify-backend version 0.13.0-beta6 to 0.13.0. let me know if you can't reproduce and I can provide more code.
Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂
Hey @ideen1, Thanks for raising this. Can you please update your backend
and backend-cli
lib to latest and try again?
Hey @AnilMaktala, I have updated both and reloaded my dev environment. Still encountering the same issue unfortunately.
@ideen1 could you please try upgrading the following 3 dependencies to the following versions:
"dependencies": {
"aws-amplify": "^6.2.0",
...
},
"devDependencies": {
"@aws-amplify/backend": "^1.0.0",
"@aws-amplify/backend-cli": "^1.0.0",
...
}
If that doesn't fix the issue, please share your schema and client code.
Hi @ideen1, Are you still experiencing this issue?
Hey 👋 , This issue is being closed due to inactivity. If you are still experiencing the same problem and need further assistance, please feel free to leave a comment. This will enable us to reopen the issue and provide you with the necessary support.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.