Commit 1271dea1 authored by Alex Kalderimis's avatar Alex Kalderimis

Add mutation fields to GraphQL docs

Add extra null-check for mutation types.

This adds deprecation notices that were missing on mutations and
arguments.

Use English expansion of `e.g.`

Correct another lowercase heading

This includes removing periods after the name of the input type.
parent 907ddb55
......@@ -25,7 +25,7 @@ module Mutations
default_value: Label::DEFAULT_COLOR,
description: <<~DESC
The color of the label given in 6-digit hex notation with leading '#' sign
(e.g. `#FFAABB`) or one of the CSS color names
(for example, `#FFAABB`) or one of the CSS color names
<https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords>.
DESC
......
......@@ -63,7 +63,7 @@ module Gitlab
def render_full_field(field, heading_level: 3, owner: nil)
conn = connection?(field)
args = field[:arguments].reject { |f| conn && CONNECTION_ARGS.include?(f[:name]) }
args = field[:arguments].reject { |arg| conn && CONNECTION_ARGS.include?(arg[:name]) }
arg_owner = [owner, field[:name]]
chunks = [
......@@ -370,7 +370,7 @@ module Gitlab
input_field = query[:input_fields]&.first
return unless input_field
"Input type: `#{input_field[:type][:name]}`."
"Input type: `#{input_field[:type][:name]}`"
end
def deprecations
......
......@@ -33,7 +33,7 @@
:plain
## `Mutation` type
The `Mutation` type contains the API's top-level entry points for all executable mutations.
The `Mutation` type contains all the mutations you can execute.
All mutations receive their arguments in a single input object named `input`, and all mutations
support at least a return field `errors` containing a list of error messages.
......
......@@ -414,7 +414,7 @@ RSpec.describe Gitlab::Graphql::Docs::Renderer do
Make everything very pretty.
Input type: `MakeItPrettyInput`.
Input type: `MakeItPrettyInput`
#### Arguments
......
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