Test API with GraphiQL

If you just want to test the Query or explore the possibilities of the API, we have provided a special client. It allows you to write queries and check the results faster, and, because, it is part of the Qualio application, it does not require the use of a token.

Please note that this tool does not allow you to use the potential of the API (queries are not executed remotely but in Qualio web application). It only allows you to quickly test your queries in GraphQL language.

To get to the customer, please log in to the Qualio application and click on the link: https://app.qualio.com/client. The link to the GraphiQL client can also be found in hints on the access settings page.

GraphiQL client at Qualio

The GraphiQL client view consists of three windows (from the left):

  • a query entry window,
  • query results window,
  • documentation window showing structures in the GraphQL API for Qualio.

On the top bar there are buttons (from the left):

  • to execute the query,
  • to format the query ("Prettify"),
  • to view query history ("History")

We will do the same query as at the beginning of this chapter (this time we want to include email address also). Please enter the following query and click on the start button - the first one on the left on the top bar.

Example query in GraphiQL client

We should get the expected result: username and his email.

Using the client should be simple and intuitive. However, please remember that the actions performed are actually performed: e.g. creating a new document via API will actually create a document in the application.

Advanced Examples

Here are some examples of advanced API usage.

Get first 50 active normal users

query {
  users(first:50,roleIn:[normal],activeIs:true) {
    edges {
      node {
        id
        fullName
        email
      }
    }
  }
}


Query filters users that are active once what role they play in the company.  Inquiries about users are paged, so the following structure has been used: https://graphql.org/learn/pagination/#pagination-and-edges

Get first 100 effective documents with content (in HTML)

query {
  documents(first:100,statusIn:[effective]) {
    edges {
      node {
        id
        sections {
          title
          content
        }
      }
    }
  }
}


Query filters documents that are effective. Note that query returns html content divided into sections.

Change document owner

mutation changeOwner {
  changeOwner(documentId:"DOC_ID",newOwnerId:"NEW_OWNER_ID") {
    errors {
      __typename
    }
    document {
      id
      owner {
        id
      }
    }
  }
}


Query changes document owner. Note that documentId and newOwnerId can be fetched by two previous queries.

Did this answer your question?