Connecting with Postman or API Connect for GraphQL Dashboard

Use API testing tools such as Postman or API Connect for GraphQL Dashboard as your frontend.

Although stepzen start provides a very helpful GraphQL editor for testing your API, you might want to use some other tools, such as Postman or API Connect for GraphQL Dashboard.

Set up your environment

You need your API Connect for GraphQL account and keys, a workspace, and your API endpoint URL. If you did not set up your machine already, complete the steps in Setting up your environment.

Test a GraphQL API with Postman

Complete the following steps in Postman to connect to your GraphQL API:

  1. Select the Authorization option beneath the endpoint URL.
  2. Set Type to API Key.
  3. Populate the options as follows, replacing {APIKEY} with your own API key:
    • Key: Authorization
    • Value: apikey {APIKEY}
    • Add to: Header

    Postman should look like the following image:

    Setting up Postman
  4. Add your GraphQL query in Body > GraphQL.

For more information, see the Postman Learning Center.

Test a GraphQL API with API Connect for GraphQL Dashboard

API Connect for GraphQL Dashboard is IBM's GraphQL IDE (interactive development environment).API Connect for GraphQL Dashboard

Complete the following steps to set up API Connect for GraphQL Dashboard and connect to your GraphQL API:

  1. Login to the API Connect for GraphQL Dashboard.
  2. Click the Explorer menu.
  3. Open a new workspace using a URL endpoint in the following format:
    https://<domain>/api/<api_name>/graphql
  4. Click the Headers tab at the bottom of the Dashboard, and configure your API key as follows, replacing {APIKEY} with your own API key:
    {
      "Authorization": "apikey {APIKEY}"
    }

    API Connect for GraphQL Dashboard should look like the following image:

    IBM Dashboard

Now you can inspect and query your GraphQL endpoint running on API Connect for GraphQL.