Docs
Launch GraphOS Studio

Additional Explorer features


Display

Dark mode

Toggle between light and dark mode from the 's Settings tab.

Table layout for response data

Toggle between table and JSON layout from the top of the 's Response panel.

You can view an 's response as JSON or as a table. Table layout is especially useful when your response includes an array, or when you want to share a query's results with someone who isn't familiar with JSON.

When looking at arrays of data in table mode, you can click the header of any column of data to sort your array by that column's values.

Inline/Extract fragments

Right-click any name to inline that fragment in queries where it is used. Right-click any selection of s to extract those fields into a fragment.

While editing your s, you can now inline and extract your s with one click. This is useful when trying to select the same s in multiple places using fragments, or when trying too inline fragments into a single operation to be used somewhere else.

Inline/Extract variables

Click the "..." menu next to an in the editor to select a notation for s.

While editing your s, you can toggle between inline or extracted notation for s. This is useful when you want to switch notations to copy and paste something, or when you're drafting a query in the editor and want to move it to your code.

Inline variable

query.graphql
query {
user(id: "Beth Harmon") {
name
}
}

Extracted variable

query.graphql
query ($id: ID!) {
user(id: $id) {
name
}
}
variables.json
{
"id": "Beth Harmon"
}

File upload

The supports file upload for servers that support the GraphQL multipart request spec. To run an that requires files as input, click + Add files in the 's Variables tab:

File upload in the Explorer

You can then set the name of the and select the files you want to upload. Note that if your supports providing multiple files via a single , you need to select the toggle for that variable to enable the multi-file protocol.

Local development

You can use the for local development by opening Sandbox.

Unlike a deployed graph, Sandbox uses introspection to fetch your from your development server, and it also polls regularly for changes. Whenever schema changes are detected, they're pulled in automatically.

You can pause polling at any time. To do so, open the Settings tab on the left and edit your connection settings. In the dialog, disable Auto Update.

Supergraphs

Query plans for supergraphs

If you're working with a in Studio, the dynamically calculates example query plans for your s in the right-hand panel (click Response and select Query Plan Preview from the dropdown):

Query plan in the Explorer

If you don't see the Query Plan Preview option, make sure you're using the full version of the , not Apollo Sandbox. Also make sure you're using the with a .

As you edit an , the recalculates its example query plan accordingly.

⚠️ The Explorer might not use the exact same query planning logic as your router! The example query plan helps you reason about your s, but it is not intended as a source of truth.

There are two display modes for query plans. You can switch between Show plan as text and Show plan as chart by clicking the icons next to Query Plan Preview:

Query plan diagram in the Explorer

Embedding

If you've enabled public access to a variant of your graph, you can embed the in a webpage that you can then provide to your graph's consumers. This enables those consumers to test out s from your own website.

See Embedding the Explorer.

Saving operations

Operation history

View your history from the 's Run history tab.

The saves the history of your recently run s (and the values for those operations) to your browser's local storage. Access your history to retain and recover previous work without cluttering your editor.

Downloading responses

You can copy responses from your s with a button or download any given response to a local JSON file.

If you are looking at your data in the table layout, you will also be able to download arrays in your response to CSV files.

Testing operations

Tracing

Enable Inlined traces from the 's Settings tab.

If you're using Apollo Server, you can see traces from your responses inlined in the by adding the ApolloServerPluginInlineTrace plugin to your server's configuration:

import {ApolloServerPluginInlineTrace} from '@apollo/server/plugin/inlineTrace';
const server = new ApolloServer({
typeDefs,
resolvers,
plugins: [ApolloServerPluginInlineTrace()]
});

Turning on the inlined traces feature in the 's settings tells the Explorer to forward a special header to your server to request that it return tracing information along with its response.

Mocked responses

Enable Mock responses from the 's Settings tab.

This feature naively mocks responses based on your 's types, instead of sending your operations over the wire to your endpoint.

Mocked responses are helpful if you want to get a feel for the shape of a query's response when your endpoint isn't available, or if you need a quick response to use in a code sample or a unit test.

Response hints

Enable Use response hints from the 's Settings tab.

As you build your query, the runs partial queries under the hood and shows their results in-line. This is helpful when you want to get a sense of the data you'll get back in your full response. It can also help you retrieve a quick answer to a query without needing to click the Run button.

The does not show response hints for s (this requires running partial mutations, which is unsafe).

Default headers

Set Default Headers from the 's Settings tab.

WARNING: Do not use default headers to provide sensitive information, such as an access token. Instead, use environment variables

You can specify default headers that are applied to every request executed by every user in your organization. This can be useful if you want to provide a consistent identifier to your server for requests coming from the .

Field latency hints

As an alternative to response hints, the can show you hints for the latency of the s in your query. This option is available only if you've configured your graph to report field usage and tracing data to Studio.

The shows you the 95th-percentile (default) response times for the s in your query to help you get a sense of how "expensive" your query is and what the bottlenecks in response time will be. You can change which percentile you want to see hints from at any time in the Explorer settings.

graphql-lodash integration

The extends your schema with graphql-lodash on the client side, so you can write queries that include lodash s and they will resolve correctly. This is helfpul if you want to manipulate your response data into into a specific format for exporting, or if you want to do some quick analysis without needing to export.

Here's an example of a query that uses graphql-lodash. You can try pasting this in the embedded at http://apollographql.com/studio/develop:

example.graphql
query StarWarsGenderStats {
genderStats: allPeople @_(get: "edges") {
edges @_(countBy: "node.gender") {
node {
gender
}
}
}
}

FAQ

Is the Explorer available for on-prem distribution?

The is not currently available for download or on-prem hosting. However, you can embed the Apollo-hosted Explorer on your own internal websites. For details, see Embedding the Explorer.

Do my Explorer operations pass through Apollo systems?

No. s you run in the are sent directly from your browser to your GraphQL endpoint, without passing through any Apollo systems along the way. Apollo never sees your request headers or response data. For more information, see GraphOS Studio data privacy and compliance.

Previous
Operation collections
Edit on GitHubEditForumsDiscord