gpt4 book ai didi

aws-cli - 如何向 aws appsync api 提供 graphql 模式的 blob?

转载 作者:行者123 更新时间:2023-12-01 22:09:29 25 4
gpt4 key购买 nike

我正在尝试使用 aws appsync api (StartSchemaCreation) 使用现有 graphql api 的模式创建新 graphql api 的模式,我使用 aws appsync 的 GetIntrospectionSchema api 转储了该模式。但是 StartSchemaCreation 的 --definition 参数要求我提供一团 graphql 模式以在新的 api 中创建。我在 .json 和 .graphql 文件中有我的 graphql 模式,但我不能直接使用它们,因为它给出错误“无法解析模式文档 - 确保它是一个有效的 SDL 格式的文档。”

我需要帮助了解如何通过 start-schema-creation 的 --definition 参数传递我的 graphql 模式。

我正在使用 aws-cli StartSchemaCreation。

最佳答案

你可以使用

aws appsync start-schema-creation \
--api-id <your-api-id> \
--definition file://<file-path>

关于aws-cli - 如何向 aws appsync api 提供 graphql 模式的 blob?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49278273/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com