-
Notifications
You must be signed in to change notification settings - Fork 825
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
How I can resolve multiapi for mobile platform generation? #6939
Comments
Hi @xerxses. Can you please give us more details about the steps you followed and the error logs to help us reproduce this issue? |
Hi @phani-srikar I don’t work with Amplify for year. But when I open this request we have a problem with next case. We have production.domain.com and develop.domain.com. We have case with different version of GraphQL for each target, kind new entity or new field. We want flexible generation for each target, because amplify codegen add --apiId ask questions and take a time. We do small research and we tried write bash script which answer questions of amplify codegen add --apiId automatically, but one of them couldn’t be answered automatically in bash. We try other way when we call amplify codegen add --apiId .graphqlconfig.yml has changes to needed target. We have written bash script which generate .graphqlconfig.yml for requested target, like sh custom_codegen --target production, inside we rewrite .grapqlconfig.yml and call amplify codegen and we expect next .graphqlconfig.yml setup target for amplify codegen, but this haven’t any effect. Our request was in more flexible work with few targets and ways to solve this case at the moment, but it was more than year ago. Maybe it’s currently done. |
Hi @xerxses. Thank you for elaborating on your requirements. If I understand this correctly, you want to use more than one APIs in your application and need an easier way to manage them transparently. We do not support this use-case yet. We are tracking a similar request aws-amplify/amplify-category-api#225 here. Transferring this issue to Amplify CLI team. |
Closing this as a dup of aws-amplify/amplify-category-api#225. |
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 |
** Which Category is your question related to? **
Codegen
** What AWS Services are you utilizing? **
Amplify for generation AppSync API file
** Provide additional details e.g. code snippets **
I have in cloud three APIs(dev, release, prod). As I understood env didn't have any role on mobile side generation. I have one created environment and do the next: amplify codegen add --apiId, remove .graphqlconfig.yml and repeat it for each api. I can see now three APIs with amplify status. I made bash script which create .graphqlconfig.yml with correct project name and correct directories(project root/dev|release|prod) by target and call codegen, but it doesn't work.
I expected the following .graphqlconfig.yml provide to codegen info which API will be used, but it works in different way. How I can support this?
The text was updated successfully, but these errors were encountered: