2019-10-17 15:06:17 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Resolvers
|
|
|
|
class TodoResolver < BaseResolver
|
2022-06-28 18:08:20 +00:00
|
|
|
description 'Retrieve a single to-do item'
|
2019-10-17 15:06:17 +00:00
|
|
|
|
2022-06-28 18:08:20 +00:00
|
|
|
type Types::TodoType, null: true
|
2019-10-17 15:06:17 +00:00
|
|
|
|
2022-06-28 18:08:20 +00:00
|
|
|
argument :id, Types::GlobalIDType[Todo],
|
|
|
|
required: true,
|
|
|
|
description: 'ID of the to-do item.'
|
2019-10-17 15:06:17 +00:00
|
|
|
|
2022-06-28 18:08:20 +00:00
|
|
|
def resolve(id:)
|
|
|
|
GitlabSchema.find_by_gid(id)
|
2019-10-17 15:06:17 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|