Commit Graph

11 Commits

Author SHA1 Message Date
GitLab Bot 91035102b4 Add latest changes from gitlab-org/gitlab@master 2022-08-03 12:11:38 +00:00
GitLab Bot 861cc0c363 Add latest changes from gitlab-org/gitlab@master 2021-07-30 18:09:08 +00:00
GitLab Bot fcda041fc0 Add latest changes from gitlab-org/gitlab@master 2020-07-09 12:08:56 +00:00
GitLab Bot d6348d22dd Add latest changes from gitlab-org/gitlab@master 2020-06-24 09:08:32 +00:00
GitLab Bot ce493944f4 Add latest changes from gitlab-org/gitlab@master 2020-06-19 18:08:39 +00:00
GitLab Bot b6a92c969b Add latest changes from gitlab-org/gitlab@master 2020-05-07 06:09:38 +00:00
GitLab Bot 5bfb8d1fad Add latest changes from gitlab-org/gitlab@master 2020-03-18 18:09:35 +00:00
Alessio Caiazza 606a1d2d31 Expose namespace storage statistics with GraphQL
Root namespaces have storage statistics.
This commit allows namespace owners to get those stats via GraphQL
queries like the following one

{
  namespace(fullPath: "a_namespace_path") {
    rootStorageStatistics {
      storageSize
      repositorySize
      lfsObjectsSize
      buildArtifactsSize
      packagesSize
      wikiSize
    }
  }
}
2019-08-22 22:08:28 +00:00
Bob Van Landuyt 703d0246ff Add authorize to LabelType and NamespaceType
This also disables the cop with a reasoning in types where appropriate
2019-06-21 13:00:50 +02:00
Bob Van Landuyt 406808583c Render GFM html in GraphQL
This adds a `markdown_field` to our types.

Using this helper will render a model's markdown field using the
existing `MarkupHelper` with the context of the GraphQL query
available to the helper.

Having the context available to the helper is needed for redacting
links to resources that the current user is not allowed to see.

Because rendering the HTML can cause queries, the complexity of a
these fields is raised by 5 above the default.

The markdown field helper can be used as follows:

      ```
      markdown_field :note_html, null: false
      ```

This would generate a field that will render the markdown field `note`
of the model. This could be overridden by adding the `method:`
argument. Passing a symbol for the method name:

      ```
      markdown_field :body_html, null: false, method: :note
      ```

It will have this description by default:

> The GitLab Flavored Markdown rendering of `note`

This could be overridden by passing a `description:` argument.

The type of a `markdown_field` is always `GraphQL::STRING_TYPE`.
2019-06-20 08:02:33 +00:00
Alessio Caiazza 83a8b77961 Add Namespace and ProjectStatistics to GraphQL API
We can query namespaces, and nested projects.

Projects now exposes statistics
2019-06-03 12:01:32 +02:00