Skip to content
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

Custom Mutation/Query functions are not showing up under the client type #2485

Closed
ideen1 opened this issue Apr 21, 2024 · 7 comments
Closed

Comments

@ideen1
Copy link

ideen1 commented Apr 21, 2024

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.

@ykethan
Copy link

ykethan commented Apr 22, 2024

Hey,👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance 🙂

@ykethan ykethan transferred this issue from aws-amplify/amplify-backend Apr 22, 2024
@AnilMaktala
Copy link

Hey @ideen1, Thanks for raising this. Can you please update your backend and backend-cli lib to latest and try again?

@AnilMaktala AnilMaktala added question Further information is requested Gen 2 pending-response and removed pending-triage labels Apr 24, 2024
@ideen1
Copy link
Author

ideen1 commented Apr 24, 2024

Hey @AnilMaktala, I have updated both and reloaded my dev environment. Still encountering the same issue unfortunately.

@iartemiev
Copy link
Contributor

@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.

@AnilMaktala
Copy link

Hi @ideen1, Are you still experiencing this issue?

@AnilMaktala
Copy link

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.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants