AWS放大迁移graphqltransformer到v2

发布于 2025-01-29 16:28:07 字数 335 浏览 1 评论 0原文

我最近在放大后端中将@index注释添加到我的graphQl架构中,现在正在收到以下错误:

schemavalidationerror:您的GraphQl架构使用了GraphQl Qulageql transformer的新版本中的“ @index”指令。

我遵循了错误中引用的迁移指南: https://docs.amplify 。

I recently added the @index annotation to my GraphQL schema in my Amplify backend and am now getting the following error:

SchemaValidationError: Your GraphQL Schema is using "@index" directive from the newer version of the GraphQL Transformer

I've followed the migration guide referenced in the error: https://docs.amplify.aws/cli/migration/transformer-migration/ but it doesn't actually indicate how to perform the migration itself

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

汹涌人海 2025-02-05 16:28:07

GraphQL Transformer版本以amplify/cli.json进行管理,

您只需要编辑文件并设置以下两个属性:

  "features": {
    "graphqltransformer": {
      ...
      "useexperimentalpipelinedtransformer": true,
      "transformerversion": 2,
      ...
    },

从那里您可以进行amplify push或a 放大CodeGen模型,并假设指南中引用的所有更改( https://docs.amplify.aws/cli/migration/transformer-migration/ )已被迎合所有人。

The GraphQL Transformer version is managed in amplify/cli.json

You simply need to edit the file and set the following two properties:

  "features": {
    "graphqltransformer": {
      ...
      "useexperimentalpipelinedtransformer": true,
      "transformerversion": 2,
      ...
    },

From there you can do an amplify push or a amplify codegen models and assuming all changes referenced in the guide (https://docs.amplify.aws/cli/migration/transformer-migration/) have been catered for all will work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文