Apollo GraphQL Sandbox Explorer
Apollo GraphQL Sandbox Explorer
Apollo GraphQL Sandbox Explorer is a powerful, browser-based tool that allows developers to interact with GraphQL APIs without needing to install any software. It is designed to help beginners and professionals explore GraphQL schemas, write queries, test mutations, and view real-time responses directly in the browser. The Sandbox is hosted by Apollo, making it easy to start experimenting with a GraphQL API simply by opening a link to the endpoint.
It provides features like autocomplete, query validation, documentation explorer, and an intuitive interface to build and test GraphQL operations. This makes it a great starting point for learning GraphQL and understanding how data can be fetched or modified using queries and mutations.
Example
Open a GraphQL Endpoint:
Go to https://studio.apollographql.com/sandbox
and paste a GraphQL API endpoint.
For example:
https://countries.trevorblades.com/
).
Explore the Schema:
Click on the “Schema” tab to browse available queries, mutations, and types. The built-in documentation will show you what data you can request.
Write a Query:
In the editor, type a simple query such as:
{
countries {
code
name
capital
}
}
This query requests a list of countries with their code, name, and capital.
Run the Query: Click the “▶ Example Query” run button to execute the query. The results will appear in the right-hand panel in JSON format.
Example Command Usage
If you are working with a GraphQL API that supports queries, you can run a query like this
inside Apollo Sandbox:
{
country(code: "IN") {
name
currency
emoji
}
}
This command retrieves details about India including its name, currency, and emoji representation.
GraphiQL vs Apollo Sandbox
GraphiQL | Apollo Sandbox | |
---|---|---|
Hosting | Usually self-hosted or bundled with GraphQL servers. | Hosted by Apollo, accessible via a web link. |
Setup | Requires installation or integration with the server. | No setup required, runs directly in the browser. |
Features | Basic query editor and documentation explorer. | Advanced features like query history, variables, auto-completion, and schema exploration. |
Collaboration | Limited built-in collaboration support. | Can easily share links for collaborative testing and debugging. |
Integration | Mainly integrated with GraphQL servers like Apollo Server or Relay. | Tightly integrated with Apollo ecosystem and Apollo Studio for advanced analytics. |