debian-mirror-gitlab/app/graphql/types/user_type.rb

17 lines
541 B
Ruby
Raw Normal View History

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
2019-12-04 20:38:33 +05:30
field :name, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :username, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :avatar_url, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
field :web_url, GraphQL::STRING_TYPE, null: false # rubocop:disable Graphql/Descriptions
2019-02-15 15:39:39 +05:30
end
end