2019-02-15 15:39:39 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Types
|
|
|
|
class UserType < BaseObject
|
|
|
|
graphql_name 'User'
|
|
|
|
|
2019-07-07 11:18:12 +05:30
|
|
|
authorize :read_user
|
|
|
|
|
2019-02-15 15:39:39 +05:30
|
|
|
present_using UserPresenter
|
|
|
|
|
|
|
|
field :name, GraphQL::STRING_TYPE, null: false
|
|
|
|
field :username, GraphQL::STRING_TYPE, null: false
|
|
|
|
field :avatar_url, GraphQL::STRING_TYPE, null: false
|
|
|
|
field :web_url, GraphQL::STRING_TYPE, null: false
|
|
|
|
end
|
|
|
|
end
|