Created graphql user_type
This commit is contained in:
11
app/graph/types/user_type.rb
Normal file
11
app/graph/types/user_type.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
UserType = GraphQL::ObjectType.define do
|
||||
name "User"
|
||||
description "An user entry, returns basic user information"
|
||||
# Expose fields associated with User model
|
||||
field :id, types.ID, "The id of this user"
|
||||
field :created_at, types.String, "Date when this user was created"
|
||||
field :username, types.String, "The username of this user"
|
||||
field :geozone_id, types.Int, "The ID of the geozone where this user is active"
|
||||
field :gender, types.String, "The gender of this user"
|
||||
field :date_of_birth, types.String, "The birthdate of this user"
|
||||
end
|
||||
Reference in New Issue
Block a user