2018-12-05 23:21:45 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-11-08 19:23:39 +05:30
|
|
|
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
|