Skip to content
Snippets Groups Projects
Commit ff21b96d authored by Luke Duncalfe's avatar Luke Duncalfe :red_circle: Committed by Natalia Tepluhina
Browse files

Expose diff_refs on MergeRequestType

parent c01f611d
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
module Types
# rubocop: disable Graphql/AuthorizeTypes
# Types that use DiffRefsType should have their own authorization
class DiffRefsType < BaseObject
graphql_name 'DiffRefs'
field :base_sha, GraphQL::STRING_TYPE, null: false
field :head_sha, GraphQL::STRING_TYPE, null: false
field :start_sha, GraphQL::STRING_TYPE, null: false
field :head_sha, GraphQL::STRING_TYPE, null: false, description: 'The sha of the head at the time the comment was made'
field :base_sha, GraphQL::STRING_TYPE, null: false, description: 'The merge base of the branch the comment was made on'
field :start_sha, GraphQL::STRING_TYPE, null: false, description: 'The sha of the branch being compared against'
end
# rubocop: enable Graphql/AuthorizeTypes
end
......@@ -5,11 +5,11 @@ module Notes
# rubocop: disable Graphql/AuthorizeTypes
class DiffPositionBaseInputType < BaseInputObject
argument :head_sha, GraphQL::STRING_TYPE, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :head_sha)
description: copy_field_description(Types::DiffRefsType, :head_sha)
argument :base_sha, GraphQL::STRING_TYPE, required: false,
description: copy_field_description(Types::Notes::DiffPositionType, :base_sha)
description: copy_field_description(Types::DiffRefsType, :base_sha)
argument :start_sha, GraphQL::STRING_TYPE, required: true,
description: copy_field_description(Types::Notes::DiffPositionType, :start_sha)
description: copy_field_description(Types::DiffRefsType, :start_sha)
argument :paths,
Types::DiffPathsInputType,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment