Skip to content

Commit 527a629

Browse files
authored
Draft graphiql doc (#8599)
* Draft graphiql doc * Update introducing-graphiql.md
1 parent c438f63 commit 527a629

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

docs/docs/images/graphiql-docs.png

291 KB
Loading

docs/docs/introducing-graphiql.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,37 @@
22
title: Introducing GraphiQL
33
---
44

5-
This is a stub. Help our community expand it.
5+
## What's in this tutorial?
66

7-
Please use the [Gatsby Style Guide](/docs/gatsby-style-guide/) to ensure your
8-
pull request gets accepted.
7+
In this guide, you'll be learning to use something called Graph_i_QL, a tool that helps you structure GraphQL queries correctly.
8+
9+
## What is Graph_i_QL?
10+
11+
Graph_i_QL is the GraphQL integrated development environment (IDE). It's a powerful (and all-around awesome) tool
12+
you'll use often while building Gatsby websites.
13+
14+
You can access it when your site's development server is running--normally at
15+
<http://localhost:8000/___graphql>.
16+
17+
## Example of using Graph_i_QL
18+
19+
When you have <http://localhost:8000/___graphql> open, it will look something like what this video shows. In the video below, watch someone poke around the built-in `Site` "type" and see what fields are available
20+
on it—including the `siteMetadata` object.
21+
22+
<video controls="controls" autoplay="true" loop="true">
23+
<source type="video/mp4" src="/www/static/graphiql-explore.mp4"></source>
24+
<p>Your browser does not support the video element.</p>
25+
</video>
26+
27+
## How to use Graph_i_QL
28+
29+
When the development server is running for one of your Gatsby sites, open Graph_i_QL at <http://localhost:8000/___graphql> and play with your data! Press <kbd>Ctrl + Space</kbd> (or use <kbd>Shift + Space</kbd> as an alternate keyboard shortcut) to bring up the autocomplete window and <kbd>Ctrl + Enter</kbd> to run the GraphQL query.
30+
31+
Make sure to check out the Graph_i_QL docs in the upper right-hand corner of the IDE. It's easy to miss them, but they're worth visiting!
32+
33+
![A diagram pointing out where to find the GraphiQl docs](graphiql-docs.png)
34+
35+
## Other resources
36+
37+
- See [Tutorial Part 5: Source Plugins](/tutorial/part-five/) for a more complete example of using Graph_i_QL
38+
- See the [READme for Graph_i_QL](https://github.com/graphql/graphiql)

0 commit comments

Comments
 (0)