Commit 2430f26d authored by Dylan Griffith's avatar Dylan Griffith

Merge branch 'ajk-fix-types-and-descriptions' into 'master'

Add correct types and descriptions

See merge request gitlab-org/gitlab!56699
parents bd8e2856 664b1d56
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
module Resolvers module Resolvers
module Ci module Ci
class RunnerPlatformsResolver < BaseResolver class RunnerPlatformsResolver < BaseResolver
type Types::Ci::RunnerPlatformType, null: false type Types::Ci::RunnerPlatformType.connection_type, null: true
description 'Supported runner platforms.'
def resolve(**args) def resolve(**args)
runner_instructions.map do |platform, data| runner_instructions.map do |platform, data|
......
...@@ -4,6 +4,7 @@ module Resolvers ...@@ -4,6 +4,7 @@ module Resolvers
module Ci module Ci
class RunnerSetupResolver < BaseResolver class RunnerSetupResolver < BaseResolver
type Types::Ci::RunnerSetupType, null: true type Types::Ci::RunnerSetupType, null: true
description 'Runner setup instructions.'
argument :platform, GraphQL::STRING_TYPE, argument :platform, GraphQL::STRING_TYPE,
required: true, required: true,
......
...@@ -4,7 +4,7 @@ module ResolvesSnippets ...@@ -4,7 +4,7 @@ module ResolvesSnippets
extend ActiveSupport::Concern extend ActiveSupport::Concern
included do included do
type Types::SnippetType.connection_type, null: false type Types::SnippetType.connection_type, null: true
argument :ids, [::Types::GlobalIDType[::Snippet]], argument :ids, [::Types::GlobalIDType[::Snippet]],
required: false, required: false,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
module Resolvers module Resolvers
class UserStarredProjectsResolver < BaseResolver class UserStarredProjectsResolver < BaseResolver
type Types::ProjectType, null: true type Types::ProjectType.connection_type, null: true
argument :search, GraphQL::STRING_TYPE, argument :search, GraphQL::STRING_TYPE,
required: false, required: false,
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
module Types module Types
class UserType < BaseObject class UserType < BaseObject
graphql_name 'User' graphql_name 'User'
description 'Representation of a GitLab user.'
authorize :read_user authorize :read_user
......
...@@ -6444,6 +6444,8 @@ An edge in a connection. ...@@ -6444,6 +6444,8 @@ An edge in a connection.
### `User` ### `User`
Representation of a GitLab user.
| Field | Type | Description | | Field | Type | Description |
| ----- | ---- | ----------- | | ----- | ---- | ----------- |
| `assignedMergeRequests` | [`MergeRequestConnection`](#mergerequestconnection) | Merge Requests assigned to the user. | | `assignedMergeRequests` | [`MergeRequestConnection`](#mergerequestconnection) | Merge Requests assigned to the user. |
......
...@@ -9,7 +9,7 @@ RSpec.describe Resolvers::Ci::RunnerPlatformsResolver do ...@@ -9,7 +9,7 @@ RSpec.describe Resolvers::Ci::RunnerPlatformsResolver do
subject(:resolve_subject) { resolve(described_class) } subject(:resolve_subject) { resolve(described_class) }
it 'returns all possible runner platforms' do it 'returns all possible runner platforms' do
expect(resolve_subject).to include( expect(resolve_subject).to contain_exactly(
hash_including(name: :linux), hash_including(name: :osx), hash_including(name: :linux), hash_including(name: :osx),
hash_including(name: :windows), hash_including(name: :docker), hash_including(name: :windows), hash_including(name: :docker),
hash_including(name: :kubernetes) hash_including(name: :kubernetes)
......
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