diff options
Diffstat (limited to 'lib/types')
| -rw-r--r-- | lib/types/cake.rb | 5 | ||||
| -rw-r--r-- | lib/types/query.rb | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/lib/types/cake.rb b/lib/types/cake.rb new file mode 100644 index 0000000..94f3240 --- /dev/null +++ b/lib/types/cake.rb @@ -0,0 +1,5 @@ +module Types + class Cake < GraphQL::Schema::Object + field :name, String, null: false + end +end diff --git a/lib/types/query.rb b/lib/types/query.rb new file mode 100644 index 0000000..253f5d7 --- /dev/null +++ b/lib/types/query.rb @@ -0,0 +1,10 @@ +module Types + class Query < GraphQL::Schema::Object + field :me, String, null: false + field :cakes, [Cake], null: false + + def me + 'mo' + end + end +end |
