Welcome to mirror list, hosted at ThFree Co, Russian Federation.

todo_resolver.rb « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0653cd27b4d2c50e299f2199a4a2865d05fdabae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Resolvers
  class TodoResolver < BaseResolver
    description 'Retrieve a single to-do item'

    type Types::TodoType, null: true

    argument :id, Types::GlobalIDType[Todo],
             required: true,
             description: 'ID of the to-do item.'

    def resolve(id:)
      GitlabSchema.find_by_gid(id)
    end
  end
end