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

How I can resolve multiapi for mobile platform generation? #6939

Closed
xerxses opened this issue Sep 26, 2019 · 5 comments
Closed

How I can resolve multiapi for mobile platform generation? #6939

xerxses opened this issue Sep 26, 2019 · 5 comments

Comments

@xerxses
Copy link

xerxses commented Sep 26, 2019

** 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?

@AaronZyLee AaronZyLee transferred this issue from aws-amplify/amplify-cli Feb 3, 2021
@phani-srikar
Copy link
Contributor

Hi @xerxses. Can you please give us more details about the steps you followed and the error logs to help us reproduce this issue?

@xerxses
Copy link
Author

xerxses commented Feb 10, 2021

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.

@phani-srikar phani-srikar self-assigned this Mar 19, 2021
@phani-srikar
Copy link
Contributor

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.

@phani-srikar phani-srikar transferred this issue from aws-amplify/amplify-codegen Mar 19, 2021
@phani-srikar phani-srikar removed their assignment Mar 19, 2021
@kaustavghosh06 kaustavghosh06 transferred this issue from aws-amplify/amplify-cli Mar 22, 2021
@kaustavghosh06 kaustavghosh06 transferred this issue from aws-amplify/amplify-codegen Mar 22, 2021
@kaustavghosh06
Copy link
Contributor

Closing this as a dup of aws-amplify/amplify-category-api#225.

@github-actions
Copy link

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 *-help channels for those types of questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants