diff options
| author | mo khan <mo.m.khan@shopify.com> | 2020-12-23 15:05:00 -0700 |
|---|---|---|
| committer | mo khan <mo.m.khan@shopify.com> | 2020-12-23 15:05:00 -0700 |
| commit | 35f62884ceee77fa28bec0533e0f3bb15336e941 (patch) | |
| tree | 84787779650e0437107fa41052cef1eb503ae4e3 /lib/server.rb | |
| parent | b8670e1826f05b38e6b2405d0ca916573de43284 (diff) | |
chore: move types to separate files
Diffstat (limited to 'lib/server.rb')
| -rw-r--r-- | lib/server.rb | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/lib/server.rb b/lib/server.rb index ad3580b..30b645a 100644 --- a/lib/server.rb +++ b/lib/server.rb @@ -2,20 +2,8 @@ require 'rack' require 'json' require 'graphql' -module Types - class Cake < GraphQL::Schema::Object - field :name, String, null: false - end - - class Query < GraphQL::Schema::Object - field :me, String, null: false - field :cakes, [Cake], null: false - - def me - 'mo' - end - end -end +require 'types/cake' +require 'types/query' class MySchema < GraphQL::Schema max_complexity 400 |
