Commit 952a6363 authored by Mike Jang's avatar Mike Jang Committed by Mike Lewis

Include a functional example in GraphQL docs

parent 9a1a4e25
...@@ -14,7 +14,15 @@ For those new to the GitLab GraphQL API, see ...@@ -14,7 +14,15 @@ For those new to the GitLab GraphQL API, see
- Get an [introduction to GraphQL from graphql.org](https://graphql.org/). - Get an [introduction to GraphQL from graphql.org](https://graphql.org/).
- GitLab supports a wide range of resources, listed in the [GraphQL API Reference](reference/index.md). - GitLab supports a wide range of resources, listed in the [GraphQL API Reference](reference/index.md).
#### GraphiQL ### Examples
To work with sample queries that pull data from public projects on GitLab.com,
see the menu options in the left-hand
documentation menu, under API > GraphQL at `https://docs.gitlab.com/ee/api/graphql/`.
The [Getting started](getting_started.md) page includes different methods to customize GraphQL queries.
### GraphiQL
Explore the GraphQL API using the interactive [GraphiQL explorer](https://gitlab.com/-/graphql-explorer), Explore the GraphQL API using the interactive [GraphiQL explorer](https://gitlab.com/-/graphql-explorer),
or on your self-managed GitLab instance on or on your self-managed GitLab instance on
......
# Identify issue boards with GraphQL
This page describes how you can use the GraphiQL explorer to identify
existing issue boards in the `gitlab-docs` documentation repository.
## Set up the GraphiQL explorer
This procedure presents a substantive example that you can copy and paste into your own
instance of the [GraphiQL explorer](https://gitlab.com/-/graphql-explorer):
1. Copy the following code excerpt:
```graphql
query {
project(fullPath: "gitlab-org/gitlab-docs") {
name
forksCount
statistics {
wikiSize
}
issuesEnabled
boards {
nodes {
id
name
}
}
}
}
```
1. Open the [GraphiQL Explorer](https://gitlab.com/-/graphql-explorer) page.
1. Paste the `query` listed above into the left window of your GraphiQL explorer tool.
1. Click Play to get the result shown here:
![GraphiQL explorer search for boards](img/sample_issue_boards_v13_2.png)
If you want to view one of these boards, take one of the numeric identifiers shown in the output. From the screenshot, the first identifier is `105011`. Navigate to the following URL, which includes the identifier:
```markdown
https://gitlab.com/gitlab-org/gitlab-docs/-/boards/105011
```
For more information on each attribute, see the [GraphQL API Resources](reference/index.md).
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment