-
Notifications
You must be signed in to change notification settings - Fork 63
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
Get the introspection schema with amplify pull (without pulling the backend ressources) #223
Comments
Hi @alexboulay, we support the use case of automatically downloading the introspection schema for codegen by using |
When you say "uninitialized project", do you mean a project that's been pulled without the backend? Because my goal is to simply run |
By uninitialized project we mean a project where |
Sweet. In the meantime, I tried your suggestion. It seems that within my project where I have pulled an existing project(without pulling back end ressources), I run |
Any updates? How can we download the introspection schema? @nikhname, unfortunately your explanation doesn't work. And codegen isn't perfect (especially models and types). Don't you think about cooperation with graphql-codegen team? Their codegen is perfect. They generate hooks and it helps to avoid code duplication all the time and keep strict typing. |
@alexboulay I've found the way how to workaround this issue. It's not the best solution, but better than nothing
if you don't feel like sending
and
or you can generate
|
I'm also struggling with this. In my project which do not modify the backend I have to download the introspection schema via aws sdk and then generate the types. It would be nice to do that in one go with amplify codegen. |
I would request this be changed from feature-request to bug. Currently, I am not able to get codegen to use schema.json, schema.graphql or to download and introspect by giving an appId. Using either of the schema.json or schema.graphql that is downloaded from AppSync still requires a backend listed. Current example and use case.
Only after cp schema to that location does it seem to work, however, the next amplify pull erases this and it must be replaced. |
This can be accomplished by:
|
This issue is now closed. Comments on closed issues are hard for our team to see. |
Is your feature request related to a problem? Please describe.
When a front-end engineer wants to use a GraphQL API, he will pull the Amplify project to access it. He does not have the intention of modifying the APIs or Functions within that Amplify project. However, he wants to use
amplify codegen
which would require to download the introspection schema from the AppSync console. Not a very nice workflow since he want's to regenerate his code as soon as there is new stuff added to the API.Describe the solution you'd like
It would be nice to be able to do
amplify codegen
, without having to download the introspection schema manually. The current solution is to pull the backend by saying "yes" when prompted by the CLI to this question "Do you plan on modifying this backend?". Maybe, another question would be, would you like to pull the introspection schema? And each subsequent pull would update the schema in question. This way, it is easy for front-end devs to keep up with the schema.The text was updated successfully, but these errors were encountered: