summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Artur <felipefac@gmail.com>2019-07-10 11:29:06 -0300
committerFelipe Artur <felipefac@gmail.com>2019-07-10 11:29:06 -0300
commit329b50c281a7daa024bbcaf53dfcaf56257c42cb (patch)
treec38b2bcabab624b3dffccef39d46d10a2d9094a2
parent599b0a3b1e4be52aec4ba814826996a4534a52a0 (diff)
downloadgitlab-ce-issue_57694.tar.gz
Fix build and address review commentsissue_57694
-rw-r--r--doc/api/graphql/reference/index.md120
-rw-r--r--lib/gitlab/graphql/docs/renderer.rb2
-rw-r--r--lib/gitlab/graphql/docs/templates/default.md.haml4
3 files changed, 92 insertions, 34 deletions
diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md
index 4c710cb2aab..2d3bec4ff67 100644
--- a/doc/api/graphql/reference/index.md
+++ b/doc/api/graphql/reference/index.md
@@ -4,15 +4,34 @@
Please do not edit this file directly, check compile_docs task on lib/tasks/gitlab/graphql.rake.
--->
-# GraphQL API Resources(Alpha)
+# GraphQL API Resources
-This documentation is self generated based on GitLab current Graphql schema.
+This documentation is self-generated based on GitLab current GraphQL schema.
The API can be explored interactively using the [GraphiQL IDE](../index.md#graphiql).
## Objects
-#### Blob
+### AddAwardEmojiPayload
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `clientMutationId` | String | A unique identifier for the client performing the mutation. |
+| `errors` | String! => Array | Reasons why the mutation failed. |
+| `awardEmoji` | AwardEmoji | The award emoji after mutation |
+
+### AwardEmoji
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `name` | String! | The emoji name |
+| `description` | String! | The emoji description |
+| `unicode` | String! | The emoji in unicode |
+| `emoji` | String! | The emoji as an icon |
+| `unicodeVersion` | String! | The unicode version for this emoji |
+| `user` | User! | The user who awarded the emoji |
+
+### Blob
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -24,7 +43,21 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `webUrl` | String | |
| `lfsOid` | String | |
-#### DetailedStatus
+### Commit
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `id` | ID! | |
+| `sha` | String! | |
+| `title` | String | |
+| `description` | String | |
+| `message` | String | |
+| `authoredDate` | Time | |
+| `webUrl` | String! | |
+| `author` | User | |
+| `latestPipeline` | Pipeline | Latest pipeline for this commit |
+
+### DetailedStatus
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -37,7 +70,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `text` | String! | |
| `tooltip` | String! | |
-#### DiffPosition
+### DiffPosition
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -55,14 +88,14 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `width` | Int | The total width of the image |
| `height` | Int | The total height of the image |
-#### Discussion
+### Discussion
| Name | Type | Description |
| --- | ---- | ---------- |
| `id` | ID! | |
| `createdAt` | Time! | |
-#### Group
+### Group
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -81,13 +114,13 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `avatarUrl` | String | |
| `parent` | Group | |
-#### GroupPermissions
+### GroupPermissions
| Name | Type | Description |
| --- | ---- | ---------- |
| `readGroup` | Boolean! | Whether or not a user can perform `read_group` on this resource |
-#### Issue
+### Issue
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -115,7 +148,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `updatedAt` | Time! | |
| `taskCompletionStatus` | TaskCompletionStatus! | |
-#### IssuePermissions
+### IssuePermissions
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -125,7 +158,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `createNote` | Boolean! | Whether or not a user can perform `create_note` on this resource |
| `reopenIssue` | Boolean! | Whether or not a user can perform `reopen_issue` on this resource |
-#### Label
+### Label
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -135,7 +168,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `color` | String! | |
| `textColor` | String! | |
-#### MergeRequest
+### MergeRequest
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -183,7 +216,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `headPipeline` | Pipeline | |
| `taskCompletionStatus` | TaskCompletionStatus! | |
-#### MergeRequestPermissions
+### MergeRequestPermissions
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -196,7 +229,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `cherryPickOnCurrentMergeRequest` | Boolean! | Whether or not a user can perform `cherry_pick_on_current_merge_request` on this resource |
| `revertOnCurrentMergeRequest` | Boolean! | Whether or not a user can perform `revert_on_current_merge_request` on this resource |
-#### MergeRequestSetWipPayload
+### MergeRequestSetWipPayload
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -204,14 +237,14 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `errors` | String! => Array | Reasons why the mutation failed. |
| `mergeRequest` | MergeRequest | The merge request after mutation |
-#### Metadata
+### Metadata
| Name | Type | Description |
| --- | ---- | ---------- |
| `version` | String! | |
| `revision` | String! | |
-#### Milestone
+### Milestone
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -223,7 +256,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `createdAt` | Time! | |
| `updatedAt` | Time! | |
-#### Namespace
+### Namespace
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -238,7 +271,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `lfsEnabled` | Boolean | |
| `requestAccessEnabled` | Boolean | |
-#### Note
+### Note
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -257,7 +290,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `resolvedAt` | Time | The time the discussion was resolved |
| `position` | DiffPosition | The position of this note on a diff |
-#### NotePermissions
+### NotePermissions
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -267,7 +300,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `resolveNote` | Boolean! | Whether or not a user can perform `resolve_note` on this resource |
| `awardEmoji` | Boolean! | Whether or not a user can perform `award_emoji` on this resource |
-#### PageInfo
+### PageInfo
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -276,7 +309,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `startCursor` | String | When paginating backwards, the cursor to continue. |
| `endCursor` | String | When paginating forwards, the cursor to continue. |
-#### Pipeline
+### Pipeline
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -295,7 +328,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `finishedAt` | Time | |
| `committedAt` | Time | |
-#### PipelinePermissions
+### PipelinePermissions
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -303,7 +336,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `adminPipeline` | Boolean! | Whether or not a user can perform `admin_pipeline` on this resource |
| `destroyPipeline` | Boolean! | Whether or not a user can perform `destroy_pipeline` on this resource |
-#### Project
+### Project
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -342,14 +375,14 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `requestAccessEnabled` | Boolean | |
| `onlyAllowMergeIfAllDiscussionsAreResolved` | Boolean | |
| `printingMergeRequestLinkEnabled` | Boolean | |
-| `namespace` | Namespace! | |
+| `namespace` | Namespace | |
| `group` | Group | |
| `statistics` | ProjectStatistics | |
-| `repository` | Repository! | |
+| `repository` | Repository | |
| `mergeRequest` | MergeRequest | |
| `issue` | Issue | |
-#### ProjectPermissions
+### ProjectPermissions
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -391,7 +424,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `destroyPages` | Boolean! | Whether or not a user can perform `destroy_pages` on this resource |
| `readPagesContent` | Boolean! | Whether or not a user can perform `read_pages_content` on this resource |
-#### ProjectStatistics
+### ProjectStatistics
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -403,7 +436,15 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `packagesSize` | Int! | |
| `wikiSize` | Int | |
-#### Repository
+### RemoveAwardEmojiPayload
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `clientMutationId` | String | A unique identifier for the client performing the mutation. |
+| `errors` | String! => Array | Reasons why the mutation failed. |
+| `awardEmoji` | AwardEmoji | The award emoji after mutation |
+
+### Repository
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -412,7 +453,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `exists` | Boolean! | |
| `tree` | Tree | |
-#### Submodule
+### Submodule
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -422,14 +463,29 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `path` | String! | |
| `flatPath` | String! | |
-#### TaskCompletionStatus
+### TaskCompletionStatus
| Name | Type | Description |
| --- | ---- | ---------- |
| `count` | Int! | |
| `completedCount` | Int! | |
-#### TreeEntry
+### ToggleAwardEmojiPayload
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `clientMutationId` | String | A unique identifier for the client performing the mutation. |
+| `errors` | String! => Array | Reasons why the mutation failed. |
+| `awardEmoji` | AwardEmoji | The award emoji after mutation |
+| `toggledOn` | Boolean! | True when the emoji was awarded, false when it was removed |
+
+### Tree
+
+| Name | Type | Description |
+| --- | ---- | ---------- |
+| `lastCommit` | Commit | |
+
+### TreeEntry
| Name | Type | Description |
| --- | ---- | ---------- |
@@ -440,7 +496,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph
| `flatPath` | String! | |
| `webUrl` | String | |
-#### User
+### User
| Name | Type | Description |
| --- | ---- | ---------- |
diff --git a/lib/gitlab/graphql/docs/renderer.rb b/lib/gitlab/graphql/docs/renderer.rb
index 4163261d08f..f47a372aa19 100644
--- a/lib/gitlab/graphql/docs/renderer.rb
+++ b/lib/gitlab/graphql/docs/renderer.rb
@@ -1,5 +1,7 @@
# frozen_string_literal: true
+return if Rails.env.production?
+
module Gitlab
module Graphql
module Docs
diff --git a/lib/gitlab/graphql/docs/templates/default.md.haml b/lib/gitlab/graphql/docs/templates/default.md.haml
index f8d647bd6e0..cc22d43ab4f 100644
--- a/lib/gitlab/graphql/docs/templates/default.md.haml
+++ b/lib/gitlab/graphql/docs/templates/default.md.haml
@@ -3,7 +3,7 @@
= auto_generated_comment
:plain
- # GraphQL API Resources (Alpha)
+ # GraphQL API Resources
This documentation is self-generated based on GitLab current GraphQL schema.
@@ -13,7 +13,7 @@
\
- objects.each do |type|
- unless type[:fields].empty?
- = "#### #{type[:name]}"
+ = "### #{type[:name]}"
\
~ "| Name | Type | Description |"
~ "| --- | ---- | ---------- |"