Getting started with GraphQL: first requests using Altair

In this activity, we use a GraphQL client (the Altair Firefox add-on) to decide exactly what to get from the countries GraphQL API, a public GraphQL API for information about countries, continents, and languages.

Open the Altair tool by clicking the icon (upper right side of Firefox: altair icon).

Enter the endpoint URL: https://countries.trevorblades.com, select the GET method and click "Docs". In the new frame, click on "Query" to display its details. 8 different queries are possible. Click on "country". This query expects a country code and will return any of the fields describing a Country: name, currency, capital...

Hover over "country" (the request name, not the return type), an "ADD QUERY" button appears on the right:
add query button

Click it, and modify the default query on the left to get the name, the continent, the capital, and the currency of the country which code is "FR":

And click "(Run query)". The response is displayed in the central panel.

GraphQL response

In case the countries service is unavailable, you can try another public GraphQL service.