|
2 | 2 | title: Introducing GraphiQL |
3 | 3 | --- |
4 | 4 |
|
5 | | -This is a stub. Help our community expand it. |
| 5 | +## What's in this tutorial? |
6 | 6 |
|
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 | + |
| 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