summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/types/cake.rb2
-rw-r--r--lib/types/query.rb5
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/types/cake.rb b/lib/types/cake.rb
index 94f3240..d610a0a 100644
--- a/lib/types/cake.rb
+++ b/lib/types/cake.rb
@@ -1,5 +1,7 @@
module Types
class Cake < GraphQL::Schema::Object
field :name, String, null: false
+ #field :created_at, DateTime, null: false
+ #field :updated_at, DateTime, null: false
end
end
diff --git a/lib/types/query.rb b/lib/types/query.rb
index 253f5d7..cda6b50 100644
--- a/lib/types/query.rb
+++ b/lib/types/query.rb
@@ -1,5 +1,10 @@
module Types
+ class User < GraphQL::Schema::Object
+ field :username, String, null: false
+ end
+
class Query < GraphQL::Schema::Object
+ #field :me, User, null: false
field :me, String, null: false
field :cakes, [Cake], null: false