Directus GraphQL Playground or GraphiQL URL

Viewed 2032

I started to use Directus and am looking for the Playground URL. I have found the GraphQL endpoint xxx.com/graphql?access_token=token. But I could not manage to find the URL for the Playground or GraphiQL.

Could anyone help me? Does anyone know if the playground is implemented or should I use an online tool like: https://lucasconstantino.github.io/graphiql-online?

Thank you and best,

Nils

2 Answers

Using Directus v9, you can connect your GraphQL client to http://{yourUrl}:8055/graphql.

In the Headers tab at the bottom of the interface of GraphQL Playground you can add the authorization in the following format:

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

I don't think Directus (v9) has a Graphiql endpoint. Have a look at this discussion on GitHub.

You could use some tool like GraphiQL online or run your own in the node project you're using Directus in.

Related