Commit 02ec916a authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch '323207-graphql-generated-docs-backticks' into 'master'

GraphQL generated docs: backtick names

See merge request gitlab-org/gitlab!55538
parents 24639ae0 f8f73969
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -28,7 +28,7 @@ module Gitlab ...@@ -28,7 +28,7 @@ module Gitlab
end end
def render_name_and_description(object) def render_name_and_description(object)
content = "### #{object[:name]}\n" content = "### `#{object[:name]}`\n"
if object[:description].present? if object[:description].present?
content += "\n#{object[:description]}" content += "\n#{object[:description]}"
......
...@@ -40,7 +40,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do ...@@ -40,7 +40,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do
specify do specify do
expectation = <<~DOC expectation = <<~DOC
### ArrayTest ### `ArrayTest`
| Field | Type | Description | | Field | Type | Description |
| ----- | ---- | ----------- | | ----- | ---- | ----------- |
...@@ -53,7 +53,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do ...@@ -53,7 +53,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do
context 'query generation' do context 'query generation' do
let(:expectation) do let(:expectation) do
<<~DOC <<~DOC
### foo ### `foo`
List of objects. List of objects.
...@@ -91,7 +91,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do ...@@ -91,7 +91,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do
specify do specify do
expectation = <<~DOC expectation = <<~DOC
### OrderingTest ### `OrderingTest`
| Field | Type | Description | | Field | Type | Description |
| ----- | ---- | ----------- | | ----- | ---- | ----------- |
...@@ -114,7 +114,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do ...@@ -114,7 +114,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do
specify do specify do
expectation = <<~DOC expectation = <<~DOC
### DeprecatedTest ### `DeprecatedTest`
| Field | Type | Description | | Field | Type | Description |
| ----- | ---- | ----------- | | ----- | ---- | ----------- |
...@@ -143,7 +143,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do ...@@ -143,7 +143,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do
specify do specify do
expectation = <<~DOC expectation = <<~DOC
### MyEnum ### `MyEnum`
| Value | Description | | Value | Description |
| ----- | ----------- | | ----- | ----------- |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment