【问题标题】:connect to hasura console using graphql playground使用 graphql Playground 连接到 hasura 控制台
【发布时间】:2021-04-20 10:56:02
【问题描述】:

我在使用 Hasura 内置 GrpahQL 操作用户界面时遇到了困难。所以我决定像以前一样使用 GrpahQL 操场。但是当我尝试访问确切的 graphql 端点时。操场上出现错误。

 Unexpected token p in JSON at position 4

我还在 HTTP 标头部分中放置了我的 Hasura 管理员密码。

{
  "x-hasura-admin-secret": "myadminsecretkey",
  "content-type": "application/json"
}

【问题讨论】:

    标签: hasura graphql-playground


    【解决方案1】:

    Hasura 服务的 GraphQL 端点将在 /v1/graphql 上提供。

    所以在你的情况下,应该是http://localhost:9695/v1/graphql

    【讨论】:

    • 谢谢。我必须使用localhost:3030/v1/graphql,即使控制台使用端口 9695 提供服务,端点 Hasura 使用的端点在 GraphQL Endpoint 部分的 Hasura 界面中清晰可见。
    猜你喜欢
    • 2023-01-02
    • 1970-01-01
    • 1970-01-01
    • 2019-12-11
    • 2023-02-24
    • 2020-04-09
    • 2015-01-13
    • 2023-04-11
    相关资源
    最近更新 更多