-
Notifications
You must be signed in to change notification settings - Fork 818
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
"No AppSync API configured" when running "amplify codegen models" #5069
Comments
I'm digging into the code and I see that it is looking for resources with |
When running |
I had this working earlier. And the AppSync documentation says this can generate types: What command is supposed to generate types in this case? It links off to the general "amplify" guide for Android, and the only thing I can find in there mentions "amplify codegen" or "amplify codegen models" which USED to generate working model classes but no longer seem to. |
If you built your AppSync API outside of Amplify there is portion of the docs here which go over this: |
Ahh okay. I think I finally puzzled it out. The actual code generation in this case is done with the gradle plugin Thanks for the help. |
And figuring things out even more: There are two types of class generation happening!
The weird part is that the AppSync console prompts you to add via |
Hey, I'm facing the same issue. |
Yes, as mentioned in my last update. If you add via API ID then you need to use the old AWSAppSyncClient and Gradle plugin. It does not work via the amplify API. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Describe the bug
Model generation doesn't work. It claims that no API is configured, but all indications are that it does have an API.
Amplify CLI Version
4.27.1
To Reproduce
Added an Api from an existing API:
amplify add codegen --apiId df4pcs54qfc7tjy4mzokjtco5y
Ran:
amplify codegen models
Got
No AppSync API configured. Please add an API
Ran
amplify status
:In amplifyconfiguration.json:
I also see all properly populated .graphql files in
app\src\main\graphql\com\amazonaws\amplify\generated\graphql
Expected behavior
The model generation works.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: