DocumentationRecipesReferenceGraphQLChangelog
Log In

Using GraphQL Playground to query data

If you prefer, you can directly query GraphQL API without using any SDK.

To try it out, you can either go to

Using the GraphQL playground hosted on Apollo:

  1. Go to http://cloud.kili-technology.com/api/label/v2/graphql.
3816
  1. In the top-left corner of the screen, click on Open connection settings.
764
  1. In the Connection settings window, under "Default headers" click on header key.
1126
  1. From the menu that appears, select "Authorization", paste your authentication token in the "value" field and then click Save.

๐Ÿ“˜

Remember to include "X-API-Key:" before your key.

1110
  1. Launch any query/mutation:
query {
  users(where: { email: "YOUR_EMAIL" }, first: 10, skip: 0) {
    id
    activated
    email
  }
}

๐Ÿ“˜

When using the playground, you will also see useful hints while typing (arguments for the functions and fields that can be queried).

Using the GraphQL playground hosted directly in our documentation site (Beta version):

  1. Get your authentication token.

  2. Open the GraphQL playground https://docs.kili-technology.com/graphql.

  3. Authenticate in the Headers tab:

"Authorization": "X-API-Key: <your Kili API key>"

Example:

1492
  1. Start building queries.

Let's say you want to count the labels added by John.

If you don't know the specific query to use, you can search for count to get a list of matching queries:

522

Query.countLabels looks promising. To get some more information, click the actual query:

451

OK, looks like this is the correct one.

You can now start building your query using the menu on the right-hand side and see it being built automatically in the playground.

790

Example:

1476

Now all you have to do is to click Try it! to count all of John's labels.