gitlab-org--gitlab-foss/app/graphql/types
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
..
ci Fix incorrect instances of `GraphQL::ID_TYPE` 2019-06-03 21:59:33 +02:00
notes Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
permission_types Expose comments on Noteables in GraphQL 2019-06-14 12:36:27 +02:00
tree Rename `BatchCommitLoader` to `BatchLfsOidLoader` 2019-06-11 16:11:21 +02:00
base_enum.rb Enable frozen string in app/graphql + app/finders 2018-09-11 12:15:23 -07:00
base_field.rb Grab field_defn to access certain values 2019-06-05 10:17:54 -05:00
base_input_object.rb Enable frozen string in app/graphql + app/finders 2018-09-11 12:15:23 -07:00
base_interface.rb Enable frozen string in app/graphql + app/finders 2018-09-11 12:15:23 -07:00
base_object.rb Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
base_scalar.rb Enable frozen string in app/graphql + app/finders 2018-09-11 12:15:23 -07:00
base_union.rb Enable frozen string in app/graphql + app/finders 2018-09-11 12:15:23 -07:00
group_type.rb Use BatchModelLoader for parent in GroupType 2019-05-20 17:23:11 -05:00
issuable_state_enum.rb Add GraphQL filters for issuables (state, labels, time fields) 2019-02-21 09:40:49 +01:00
issue_state_enum.rb Add GraphQL filters for issuables (state, labels, time fields) 2019-02-21 09:40:49 +01:00
issue_type.rb Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
label_type.rb Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
merge_request_state_enum.rb Add GraphQL filters for issuables (state, labels, time fields) 2019-02-21 09:40:49 +01:00
merge_request_type.rb Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
metadata_type.rb Add metadata about the GitLab server to GraphQL 2019-03-05 15:00:32 +00:00
milestone_type.rb GraphQL Type authorization 2019-04-03 14:36:33 +13:00
mutation_type.rb Add mutation toggling WIP state of merge requests 2018-07-25 18:37:12 +02:00
namespace_type.rb Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
order.rb Suggests issues when typing title 2018-11-27 15:10:40 +00:00
project_statistics_type.rb Do not blindly expose public project statistics 2019-06-14 20:40:21 +00:00
project_type.rb Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
query_type.rb Add Namespace and ProjectStatistics to GraphQL API 2019-06-03 12:01:32 +02:00
repository_type.rb Added repository files to GraphQL API 2019-05-22 12:43:35 +01:00
sort.rb Suggests issues when typing title 2018-11-27 15:10:40 +00:00
task_completion_status.rb Add task count and completed count to graphql types 2019-06-15 06:56:28 +02:00
time_type.rb Enable frozen string in app/graphql + app/finders 2018-09-11 12:15:23 -07:00
user_type.rb GraphQL Type authorization 2019-04-03 14:36:33 +13:00