Commit Graph

14 Commits

Author SHA1 Message Date
GitLab Bot 50ea04b6c6 Add latest changes from gitlab-org/gitlab@master 2023-01-20 12:10:00 +00:00
GitLab Bot 0624d0c79f Add latest changes from gitlab-org/gitlab@master 2022-06-15 00:09:28 +00:00
GitLab Bot 68d5cc2d9d Add latest changes from gitlab-org/gitlab@master 2022-06-01 18:09:44 +00:00
GitLab Bot 026a5e9101 Add latest changes from gitlab-org/gitlab@master 2022-05-26 09:08:11 +00:00
GitLab Bot c71c2ba4c2 Add latest changes from gitlab-org/gitlab@master 2022-05-23 09:08:01 +00:00
GitLab Bot 7f08e6916d Add latest changes from gitlab-org/gitlab@master 2022-03-15 18:08:10 +00:00
GitLab Bot 4d3bbc4990 Add latest changes from gitlab-org/gitlab@master 2022-01-24 12:10:54 +00:00
GitLab Bot 4a6e6c740b Add latest changes from gitlab-org/gitlab@master 2021-07-23 18:10:06 +00:00
GitLab Bot 7aa988fed2 Add latest changes from gitlab-org/gitlab@master 2021-04-08 21:09:13 +00:00
GitLab Bot ae42530b1b Add latest changes from gitlab-org/gitlab@master 2020-12-04 18:09:55 +00:00
GitLab Bot e6bcd6e738 Add latest changes from gitlab-org/gitlab@master 2020-09-25 09:09:40 +00:00
GitLab Bot c59765a50a Add latest changes from gitlab-org/gitlab@master 2020-06-24 18:09:03 +00:00
Brett Walker bdd5b5b695 Replace echo function with a resolver
The `GraphQL::Function` has been deprecated in
favor of resolvers.
2019-08-26 17:43:38 +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