Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit 866e343

Browse files
authored
Merge pull request #4 from GraphQLAcademy/directory-structure-basic-setup
Add GraphQL Gem, Add Directory Structure
2 parents 172a567 + 282dc9e commit 866e343

6 files changed

Lines changed: 18 additions & 50 deletions

File tree

Gemfile

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,14 @@ git_source(:github) do |repo_name|
55
"https://github.com/#{repo_name}.git"
66
end
77

8-
98
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
109
gem 'rails', '~> 5.0.1'
1110
# Use sqlite3 as the database for Active Record
1211
gem 'sqlite3'
1312
# Use Puma as the app server
1413
gem 'puma', '~> 3.0'
15-
# Use SCSS for stylesheets
16-
gem 'sass-rails', '~> 5.0'
17-
# Use Uglifier as compressor for JavaScript assets
18-
gem 'uglifier', '>= 1.3.0'
19-
# Use CoffeeScript for .coffee assets and views
20-
gem 'coffee-rails', '~> 4.2'
21-
# See https://github.com/rails/execjs#readme for more supported runtimes
22-
# gem 'therubyracer', platforms: :ruby
23-
24-
# Use jquery as the JavaScript library
25-
gem 'jquery-rails'
26-
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
27-
gem 'jbuilder', '~> 2.5'
28-
# Use ActiveModel has_secure_password
29-
# gem 'bcrypt', '~> 3.1.7'
30-
31-
# Use Capistrano for deployment
32-
# gem 'capistrano-rails', group: :development
14+
# Use GraphQL!
15+
gem 'graphql', '~> 1.4.2'
3316

3417
group :development, :test do
3518
# Call 'byebug' anywhere in the code to stop execution and get a debugger console

Gemfile.lock

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -41,28 +41,14 @@ GEM
4141
arel (7.1.4)
4242
builder (3.2.3)
4343
byebug (9.0.6)
44-
coffee-rails (4.2.1)
45-
coffee-script (>= 2.2.0)
46-
railties (>= 4.0.0, < 5.2.x)
47-
coffee-script (2.4.1)
48-
coffee-script-source
49-
execjs
50-
coffee-script-source (1.12.2)
5144
concurrent-ruby (1.0.4)
5245
debug_inspector (0.0.2)
5346
erubis (2.7.0)
54-
execjs (2.7.0)
5547
ffi (1.9.17)
5648
globalid (0.3.7)
5749
activesupport (>= 4.1.0)
50+
graphql (1.4.2)
5851
i18n (0.8.0)
59-
jbuilder (2.6.1)
60-
activesupport (>= 3.0.0, < 5.1)
61-
multi_json (~> 1.2)
62-
jquery-rails (4.2.2)
63-
rails-dom-testing (>= 1, < 3)
64-
railties (>= 4.2.0)
65-
thor (>= 0.14, < 2.0)
6652
listen (3.0.8)
6753
rb-fsevent (~> 0.9, >= 0.9.4)
6854
rb-inotify (~> 0.9, >= 0.9.7)
@@ -76,7 +62,6 @@ GEM
7662
mime-types-data (3.2016.0521)
7763
mini_portile2 (2.1.0)
7864
minitest (5.10.1)
79-
multi_json (1.12.1)
8065
nio4r (1.2.1)
8166
nokogiri (1.7.0.1)
8267
mini_portile2 (~> 2.1.0)
@@ -111,13 +96,6 @@ GEM
11196
rb-fsevent (0.9.8)
11297
rb-inotify (0.9.8)
11398
ffi (>= 0.5.0)
114-
sass (3.4.23)
115-
sass-rails (5.0.6)
116-
railties (>= 4.0.0, < 6)
117-
sass (~> 3.1)
118-
sprockets (>= 2.8, < 4.0)
119-
sprockets-rails (>= 2.0, < 4.0)
120-
tilt (>= 1.1, < 3)
12199
spring (2.0.1)
122100
activesupport (>= 4.2)
123101
spring-watcher-listen (2.0.1)
@@ -133,11 +111,8 @@ GEM
133111
sqlite3 (1.3.13)
134112
thor (0.19.4)
135113
thread_safe (0.3.5)
136-
tilt (2.0.6)
137114
tzinfo (1.2.2)
138115
thread_safe (~> 0.1)
139-
uglifier (3.0.4)
140-
execjs (>= 0.3.0, < 3)
141116
web-console (3.4.0)
142117
actionview (>= 5.0)
143118
activemodel (>= 5.0)
@@ -152,18 +127,14 @@ PLATFORMS
152127

153128
DEPENDENCIES
154129
byebug
155-
coffee-rails (~> 4.2)
156-
jbuilder (~> 2.5)
157-
jquery-rails
130+
graphql (~> 1.4.2)
158131
listen (~> 3.0.5)
159132
puma (~> 3.0)
160133
rails (~> 5.0.1)
161-
sass-rails (~> 5.0)
162134
spring
163135
spring-watcher-listen (~> 2.0.0)
164136
sqlite3
165137
tzinfo-data
166-
uglifier (>= 1.3.0)
167138
web-console (>= 3.3.0)
168139

169140
BUNDLED WITH

app/graph/mutations/.keep

Whitespace-only changes.

app/graph/query.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module Graph
2+
Query = GraphQL::ObjectType.define do
3+
name "Query"
4+
description "The query root of this schema"
5+
6+
# ... complete this schema
7+
end
8+
end

app/graph/schema.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Graph
2+
Schema = GraphQL::Schema.define do
3+
query Query
4+
end
5+
end

config/application.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@ class Application < Rails::Application
2121
# Settings in config/environments/* take precedence over those specified here.
2222
# Application configuration should go into files in config/initializers
2323
# -- all .rb files in that directory are automatically loaded.
24+
config.autoload_paths << Rails.root.join('app', 'graph')
2425
end
2526
end

0 commit comments

Comments
 (0)