问题描述
我们有一个项目仓库,其中后端团队添加了新的 api。 其他开发人员已经运行并配置了 amplify 和 codegen。 现在我想添加这些新查询及其类型。 当我运行 amplify codegen 时出现此错误:
Please download the schema.graphql or schema.json and place in C:\leag\nevClon\newwebsite before adding codegen when not in an amplify project
当我运行 amplify add codegen 时,它说 Codegen 每个项目仅支持一个 GraphQL API。 有人可以指导我这样做的正确方法是什么。
解决方法
我过去曾见过这个问题。我尝试过的事情包括......
- 确保您处于正确的放大环境中。
- 运行 amplify pull 以确保您是最新的。
- 尝试使用
amplify init
重新初始化
- 如果其他方法都失败了,请尝试重新克隆存储库。