Commit 0fa440b8 authored by Evan Read's avatar Evan Read

Merge branch 'lb-graphql-docs-make-all-examples-nullable' into 'master'

Make all field examples in GraphQL docs nullable

See merge request gitlab-org/gitlab!28739
parents 4f7f1dd3 0facdf4a
...@@ -45,8 +45,8 @@ For example, `app/graphql/types/issue_type.rb`: ...@@ -45,8 +45,8 @@ For example, `app/graphql/types/issue_type.rb`:
```ruby ```ruby
graphql_name 'Issue' graphql_name 'Issue'
field :iid, GraphQL::ID_TYPE, null: false field :iid, GraphQL::ID_TYPE, null: true
field :title, GraphQL::STRING_TYPE, null: false field :title, GraphQL::STRING_TYPE, null: true
# we also have a method here that we've defined, that extends `field` # we also have a method here that we've defined, that extends `field`
markdown_field :title_html, null: true markdown_field :title_html, null: true
...@@ -273,7 +273,7 @@ For example: ...@@ -273,7 +273,7 @@ For example:
```ruby ```ruby
field :test_field, type: GraphQL::STRING_TYPE, field :test_field, type: GraphQL::STRING_TYPE,
null: false, null: true,
description: 'Some test field', description: 'Some test field',
feature_flag: :some_feature_flag feature_flag: :some_feature_flag
``` ```
...@@ -741,7 +741,7 @@ and handles time inputs. ...@@ -741,7 +741,7 @@ and handles time inputs.
Example: Example:
```ruby ```ruby
field :created_at, Types::TimeType, null: false, description: 'Timestamp of when the issue was created' field :created_at, Types::TimeType, null: true, description: 'Timestamp of when the issue was created'
``` ```
## Testing ## Testing
......
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