问题描述
我开始使用 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}"
}