summaryrefslogtreecommitdiff
path: root/app/graphql/types/query_type.rb
blob: 010ec2d7942c16c64739dac47eff85b0cbb89334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
module Types
  class QueryType < BaseObject
    graphql_name 'Query'

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

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