Created graphql user_type

This commit is contained in:
Alberto Miedes Garcés
2016-09-29 13:26:18 +02:00
parent 6a3f7d725c
commit a6149018d9

View 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