diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-05-21 09:52:24 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-06-05 20:47:42 +0200 |
commit | aa4b1ae71260720b47695b8a256134f20280f61a (patch) | |
tree | 81020f291d634e76fe0a31d906ed73639f634b7d /doc/api/graphql | |
parent | 287c34ca1f9af4e395493c99623af8437f82d919 (diff) | |
download | gitlab-ce-aa4b1ae71260720b47695b8a256134f20280f61a.tar.gz |
Add `present_using` to types
By specifying a presenter for the object type, we can keep the logic
out of `GitlabSchema`.
The presenter gets initialized using the object being presented, and
the context (including the `current_user`).
Diffstat (limited to 'doc/api/graphql')
-rw-r--r-- | doc/api/graphql/index.md | 34 |
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 |