gitlab-ce/spec/lib
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
..
api Include the port in the URLs of the API Link headers 2019-06-06 15:11:48 +02:00
backup
banzai Allow emoji in label and milestone references 2019-06-07 10:05:57 +01:00
bitbucket
bitbucket_server
constraints
container_registry
feature Turn on Cat-File cache by default 2019-06-18 13:33:43 +02:00
gitaly
gitlab Render GFM html in GraphQL 2019-06-20 08:02:33 +00:00
google_api
json_web_token
mattermost Protect Gitlab::HTTP against DNS rebinding attack 2019-05-30 10:47:31 -03:00
microsoft_teams
object_storage
omni_auth/strategies
quality Revert "Merge branch 'revert-04c3c6dd' into 'master'" 2019-05-22 21:47:32 +02:00
rspec_flaky
safe_zip
sentry
serializers
system_check
after_commit_queue_spec.rb
event_filter_spec.rb
expand_variables_spec.rb
extracts_path_spec.rb
feature_spec.rb Cache feature flag names in Redis for a minute 2019-06-18 13:59:18 -07:00
file_size_validator_spec.rb
forever_spec.rb
gitlab_spec.rb Add DNS rebinding protection settings 2019-05-30 10:47:57 -03:00
milestone_array_spec.rb
system_check_spec.rb
uploaded_file_spec.rb