Commit Graph

11 Commits

Author SHA1 Message Date
GitLab Bot 4046c3447e Add latest changes from gitlab-org/gitlab@master 2021-02-05 15:09:28 +00:00
GitLab Bot ef8c47e97e Add latest changes from gitlab-org/gitlab@master 2021-01-20 15:10:29 +00:00
GitLab Bot bfc7eec58e Add latest changes from gitlab-org/gitlab@master 2021-01-18 15:10:42 +00:00
GitLab Bot 7b2635a55d Add latest changes from gitlab-org/gitlab@master 2020-12-01 12:09:17 +00:00
GitLab Bot 833d57e60d Add latest changes from gitlab-org/gitlab@master 2020-07-08 15:09:24 +00:00
GitLab Bot e0a8496a09 Add latest changes from gitlab-org/gitlab@master 2020-06-01 00:08:25 +00:00
GitLab Bot 2c72daf2f1 Add latest changes from gitlab-org/gitlab@master 2020-03-30 18:08:07 +00:00
GitLab Bot 6af29c941a Add latest changes from gitlab-org/gitlab@master 2019-12-16 00:07:33 +00:00
GitLab Bot b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00: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
Bob Van Landuyt b6ff5f1e14 Expose comments on Noteables in GraphQL
This exposes `Note`s on Issues & MergeRequests using a
`Types::Notes::NoteableType` in GraphQL.

Exposing notes on a new type can be done by implementing the
`NoteableType` interface on the type. The presented object should
be a `Noteable`.
2019-06-14 12:36:27 +02:00