【问题标题】:Export and import graphcool local data through graphcool cli通过graphcool cli导出和导入graphcool本地数据
【发布时间】:2020-04-23 11:34:36
【问题描述】:

我正在尝试从 graphcool local 部署中导出数据,因此我可以将其导入到我自己服务器上的另一个本地部署中。 documentation 建议使用 graphcool exportgraphcool import 命令。但是,尝试运行

graphcool export -e export.zip -t dev

打开一个浏览器窗口,将我重定向到一个 console.graph.cool 身份验证网站(云部署)。 graphcool import 命令也是如此

我在一个有 .graphcoolrc 文件的目录中:

targets:
  dev: local/ck4t9gry400040196szky9mr4
  default: dev

我还需要使用 CLI 命令导出其他内容吗?我确定我在这里遗漏了一些配置或参数,但在文档中找不到任何内容...

【问题讨论】:

    标签: graphql graphcool


    【解决方案1】:

    您需要进入项目的设置页面,单击身份验证选项卡并获取此控制台命令,其中包含您的令牌。

    graphcool login --token "supersecrettokenheresdfasdfawerfasdfawefaweafewafdsafsdfasd"
    

    运行后你不会被重定向到认证页面。

    【讨论】:

    • 这行得通!我之前只需要在graphcool.yml 中添加一个根令牌。
    猜你喜欢
    • 2018-06-08
    • 2018-06-05
    • 2018-09-03
    • 2018-07-06
    • 2018-04-29
    • 1970-01-01
    • 2015-01-26
    • 2017-03-05
    • 2018-06-20
    相关资源
    最近更新 更多