summaryrefslogtreecommitdiff
path: root/doc/api/graphql
diff options
context:
space:
mode:
Diffstat (limited to 'doc/api/graphql')
-rw-r--r--doc/api/graphql/index.md34
1 files changed, 34 insertions, 0 deletions
diff --git a/doc/api/graphql/index.md b/doc/api/graphql/index.md
new file mode 100644
index 00000000000..78e634df347
--- /dev/null
+++ b/doc/api/graphql/index.md
@@ -0,0 +1,34 @@
+# GraphQL API (Beta)
+
+> [Introduced][ce-19008] in GitLab 11.0.
+
+## Enabling the GraphQL feature
+
+The GraphQL API itself is currently in Beta, and therefore hidden behind a
+feature flag. To enable it on your selfhosted instance, run
+`Feature.enable(:graphql)`.
+
+Start the console by running
+
+```bash
+sudo gitlab-rails console
+```
+
+Then enable the feature by running
+
+```ruby
+Feature.enable(:graphql)
+```
+
+## Available queries
+
+A first iteration of a GraphQL API inlcudes only 2 queries: `project` and
+`merge_request` and only returns scalar fields, or fields of the type `Project`
+or `MergeRequest`.
+
+## GraphiQL
+
+The API can be explored by using the GraphiQL IDE, it is available on your
+instance on `gitlab.example.com/api/graphiql`.
+
+[ce-19008]: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19008