diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-18 18:06:53 +0000 |
commit | 143f196f8b3c40ceb7e9335a8dcc712b079519b9 (patch) | |
tree | 909df13e1f99b456287934741ba466b506e01129 /doc | |
parent | 575ccb036ea14c6a899482a83bd985ffbc992077 (diff) | |
download | gitlab-ce-143f196f8b3c40ceb7e9335a8dcc712b079519b9.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/logs.md | 42 | ||||
-rw-r--r-- | doc/api/graphql/reference/gitlab_schema.graphql | 30 | ||||
-rw-r--r-- | doc/api/graphql/reference/gitlab_schema.json | 92 | ||||
-rw-r--r-- | doc/api/graphql/reference/index.md | 4 | ||||
-rw-r--r-- | doc/api/projects.md | 1 | ||||
-rw-r--r-- | doc/development/fe_guide/graphql.md | 8 |
6 files changed, 177 insertions, 0 deletions
diff --git a/doc/administration/logs.md b/doc/administration/logs.md index dae0dae8395..aa10cdd220c 100644 --- a/doc/administration/logs.md +++ b/doc/administration/logs.md @@ -42,6 +42,48 @@ User clone/fetch activity using http transport appears in this log as `action: g In addition, the log contains the IP address from which the request originated (`remote_ip`) as well as the user's ID (`user_id`), and username (`username`). +NOTE: **Note:** Starting with GitLab 12.5, if an error occurs, an +`exception` field is included with `class`, `message`, and +`backtrace`. Previous versions included an `error` field instead of +`exception.class` and `exception.message`. For example: + +```json +{ + "method": "GET", + "path": "/admin", + "format": "html", + "controller": "Admin::DashboardController", + "action": "index", + "status": 500, + "duration": 2584.11, + "view": 0, + "db": 9.21, + "time": "2019-11-14T13:12:46.156Z", + "params": [], + "remote_ip": "127.0.0.1", + "user_id": 1, + "username": "root", + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:70.0) Gecko/20100101 Firefox/70.0", + "queue_duration": 274.35, + "correlation_id": "KjDVUhNvvV3", + "cpu_s": 2.837645135999999, + "exception": { + "class": "NameError", + "message": "undefined local variable or method `adsf' for #<Admin::DashboardController:0x00007ff3c9648588>", + "backtrace": [ + "app/controllers/admin/dashboard_controller.rb:11:in `index'", + "ee/app/controllers/ee/admin/dashboard_controller.rb:14:in `index'", + "ee/lib/gitlab/ip_address_state.rb:10:in `with'", + "ee/app/controllers/ee/application_controller.rb:43:in `set_current_ip_address'", + "lib/gitlab/session.rb:11:in `with_session'", + "app/controllers/application_controller.rb:450:in `set_session_storage'", + "app/controllers/application_controller.rb:444:in `set_locale'", + "ee/lib/gitlab/jira/middleware.rb:19:in `call'" + ] + } +} +``` + ## `production.log` This file lives in `/var/log/gitlab/gitlab-rails/production.log` for diff --git a/doc/api/graphql/reference/gitlab_schema.graphql b/doc/api/graphql/reference/gitlab_schema.graphql index 8a4e8166dde..a357c93b020 100644 --- a/doc/api/graphql/reference/gitlab_schema.graphql +++ b/doc/api/graphql/reference/gitlab_schema.graphql @@ -76,6 +76,11 @@ type Blob implements Entry { lfsOid: String name: String! path: String! + + """ + Last commit sha for entry + """ + sha: String! type: EntryType! webUrl: String } @@ -122,6 +127,11 @@ type Commit { author: User """ + Commit authors name + """ + authorName: String + + """ Timestamp of when the commit was authored """ authoredDate: Time @@ -1100,6 +1110,11 @@ interface Entry { id: ID! name: String! path: String! + + """ + Last commit sha for entry + """ + sha: String! type: EntryType! } @@ -2518,6 +2533,11 @@ enum IssueSort { DUE_DATE_DESC """ + Relative position by ascending order + """ + RELATIVE_POSITION_ASC + + """ Created at ascending order """ created_asc @@ -4767,6 +4787,11 @@ type Submodule implements Entry { id: ID! name: String! path: String! + + """ + Last commit sha for entry + """ + sha: String! treeUrl: String type: EntryType! webUrl: String @@ -5113,6 +5138,11 @@ type TreeEntry implements Entry { id: ID! name: String! path: String! + + """ + Last commit sha for entry + """ + sha: String! type: EntryType! webUrl: String } diff --git a/doc/api/graphql/reference/gitlab_schema.json b/doc/api/graphql/reference/gitlab_schema.json index bf0cb2ca6f2..fea67f28d69 100644 --- a/doc/api/graphql/reference/gitlab_schema.json +++ b/doc/api/graphql/reference/gitlab_schema.json @@ -10228,6 +10228,20 @@ "deprecationReason": null }, { + "name": "authorName", + "description": "Commit authors name", + "args": [ + + ], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "authoredDate", "description": "Timestamp of when the commit was authored", "args": [ @@ -11333,6 +11347,24 @@ "deprecationReason": null }, { + "name": "sha", + "description": "Last commit sha for entry", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "type", "description": null, "args": [ @@ -11454,6 +11486,24 @@ "deprecationReason": null }, { + "name": "sha", + "description": "Last commit sha for entry", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "type", "description": null, "args": [ @@ -11712,6 +11762,24 @@ "deprecationReason": null }, { + "name": "sha", + "description": "Last commit sha for entry", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "treeUrl", "description": null, "args": [ @@ -11973,6 +12041,24 @@ "deprecationReason": null }, { + "name": "sha", + "description": "Last commit sha for entry", + "args": [ + + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { "name": "type", "description": null, "args": [ @@ -13680,6 +13766,12 @@ "description": "Due date by descending order", "isDeprecated": false, "deprecationReason": null + }, + { + "name": "RELATIVE_POSITION_ASC", + "description": "Relative position by ascending order", + "isDeprecated": false, + "deprecationReason": null } ], "possibleTypes": null diff --git a/doc/api/graphql/reference/index.md b/doc/api/graphql/reference/index.md index 8432e9a43c3..151e43f4cff 100644 --- a/doc/api/graphql/reference/index.md +++ b/doc/api/graphql/reference/index.md @@ -36,6 +36,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph | Name | Type | Description | | --- | ---- | ---------- | | `id` | ID! | | +| `sha` | String! | Last commit sha for entry | | `name` | String! | | | `type` | EntryType! | | | `path` | String! | | @@ -55,6 +56,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph | `authoredDate` | Time | Timestamp of when the commit was authored | | `webUrl` | String! | Web URL of the commit | | `signatureHtml` | String | Rendered HTML of the commit signature | +| `authorName` | String | Commit authors name | | `author` | User | Author of the commit | | `latestPipeline` | Pipeline | Latest pipeline of the commit | @@ -738,6 +740,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph | Name | Type | Description | | --- | ---- | ---------- | | `id` | ID! | | +| `sha` | String! | Last commit sha for entry | | `name` | String! | | | `type` | EntryType! | | | `path` | String! | | @@ -794,6 +797,7 @@ The API can be explored interactively using the [GraphiQL IDE](../index.md#graph | Name | Type | Description | | --- | ---- | ---------- | | `id` | ID! | | +| `sha` | String! | Last commit sha for entry | | `name` | String! | | | `type` | EntryType! | | | `path` | String! | | diff --git a/doc/api/projects.md b/doc/api/projects.md index 2ec412d0f56..222ab729810 100644 --- a/doc/api/projects.md +++ b/doc/api/projects.md @@ -948,6 +948,7 @@ POST /projects | `mirror_trigger_builds` | boolean | no | **(STARTER)** Pull mirroring triggers builds | | `initialize_with_readme` | boolean | no | `false` by default | | `template_name` | string | no | When used without `use_custom_template`, name of a [built-in project template](../gitlab-basics/create-project.md#built-in-templates). When used with `use_custom_template`, name of a custom project template | +| `template_project_id` | integer | no | **(PREMIUM)** When used with `use_custom_template`, project ID of a custom project template. This is preferable to using `template_name` since `template_name` may be ambiguous. | | `use_custom_template` | boolean | no | **(PREMIUM)** Use either custom [instance](../user/admin_area/custom_project_templates.md) or [group](../user/group/custom_project_templates.md) (with `group_with_project_templates_id`) project template | | `group_with_project_templates_id` | integer | no | **(PREMIUM)** For group-level custom templates, specifies ID of group from which all the custom project templates are sourced. Leave empty for instance-level templates. Requires `use_custom_template` to be true | diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index fe4f6d7bec8..894a613ec2d 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -19,6 +19,14 @@ To save duplicated clients getting created in different apps, we have a [default client][default-client] that should be used. This setups the Apollo client with the correct URL and also sets the CSRF headers. +Default client accepts two parameters: `resolvers` and `config`. + +- `resolvers` parameter is created to accept an object of resolvers for [local state management](#local-state-with-apollo) queries and mutations +- `config` parameter takes an object of configuration settings: + - `cacheConfig` field accepts an optional object of settings to [customize Apollo cache](https://github.com/apollographql/apollo-client/tree/master/packages/apollo-cache-inmemory#configuration) + - `baseUrl` allows us to pass a URL for GraphQL endpoint different from our main endpoint (i.e.`${gon.relative_url_root}/api/graphql`) + - `assumeImmutableResults` (set to `false` by default) - this setting, when set to `true`, will assume that every single operation on updating Apollo Cache is immutable. It also sets `freezeResults` to `true`, so any attempt on mutating Apollo Cache will throw a console warning in development environment. Please ensure you're following the immutability pattern on cache update operations before setting this option to `true`. + ## GraphQL Queries To save query compilation at runtime, webpack can directly import `.graphql` |