Search code examples
aws-amplifygraphql-codegen

how to run amplify codegen in where codegen is already configured?


we have a project repo where backend team have added new apis. other developers have run and configured amplify and codegen. now I want to add these new queries and their types. when I run amplify codegen i get this error:

Please download the schema.graphql or schema.json and place in C:\leag\nevClon\newwebsite before adding codegen when not in an amplify project

and when i run amplify add codegen it says Codegen support only one GraphQL API per project. could someone guide me whats the right way to do that.


Solution

  • I've seen this problem in the past. Things I've tried include ...

    1. Make sure you are in the correct amplify environment.
    2. Run amplify pull to ensure you are up to date.
    3. Try re-initializing using amplify init
    4. When all else fails, try re-cloning the repository.