Directus GraphQL Playground 或 GraphiQL URL

问题描述

我开始使用 Directus 并正在寻找 Playground URL。我找到了 GraphQL 端点 xxx.com/graphql?access_token=token。但我无法找到 Playground 或 GraphiQL 的 URL。

有人可以帮我吗?有谁知道 Playground 是否已实施,或者我应该使用在线工具,例如:https://lucasconstantino.github.io/graphiql-online

谢谢你,祝你好运

尼尔斯

解决方法

我认为 Directus (v9) 没有 Graphiql 端点。看看this discussion on GitHub

您可以使用诸如 GraphiQL online 之类的工具或在您使用 Directus 的节点项目中运行您自己的工具。

,

使用 Directus v9,您可以将 GraphQL 客户端连接到 http://{yourUrl}:8055/graphql

在 GraphQL Playground 界面底部的 Headers 选项卡中,您可以添加以下格式的授权:

{
  "Authorization": "Bearer {token}"
}

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...