Created GraphQL Schema and query root

This commit is contained in:
Alberto Miedes Garcés
2016-09-28 12:48:24 +02:00
parent ab333d6627
commit 022340b1cf
3 changed files with 10 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
ConsulSchema = GraphQL::Schema.define do
query QueryRoot
end

View File

@@ -0,0 +1,5 @@
QueryRoot = GraphQL::ObjectType.define do
name "Query"
description "The query root for this schema"
end

View File

@@ -45,6 +45,8 @@ module Consul
config.autoload_paths << "#{Rails.root}/app/models/custom"
config.paths['app/views'].unshift(Rails.root.join('app', 'views', 'custom'))
# Add GraphQL directories to the autoload path
config.autoload_paths << Rails.root.join('app', 'graph', 'types')
end
end