1. Querying Country Data from a Public API
Frontend DeveloperBackground
A developer needs to fetch a list of continents and their codes to populate a dropdown menu in a web application.
Problem
Verifying the exact JSON structure returned by the public Countries API before writing frontend code.
How to use
Set the endpoint to https://countries.trevorblades.com/, paste the query for continents, and execute the request.
Endpoint: https://countries.trevorblades.com/
Query:
query {
continents {
code
name
}
}Outcome
The tool displays a formatted JSON response containing an array of continents with their codes and names.