summaryrefslogtreecommitdiff
path: root/app/graphql/types/query_type.rb
blob: 954bcc0a5a3396bd96abc82f54f5828d5f126d91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Types
  class QueryType < BaseObject
    graphql_name 'Query'

    field :project, Types::ProjectType,
          null: true,
          resolver: Resolvers::ProjectResolver,
          description: "Find a project",
          authorize: :read_project

    field :echo, GraphQL::STRING_TYPE, null: false, function: Functions::Echo.new
  end
end