Skip to content

Commit

Permalink
RailsInteractive::Templates - GraphQL (#48)
Browse files Browse the repository at this point in the history
* init: graphql

* add - graphql option
  • Loading branch information
oguzsh committed Apr 24, 2022
1 parent 5df6191 commit 895cfe0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rails_interactive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def database
end

def features
features = %w[devise cancancan omniauth pundit brakeman sidekiq]
features = %w[devise cancancan omniauth pundit brakeman sidekiq graphql]

@inputs[:features] = Prompt.new("Choose project features: ", "multi_select", features).perform
end
Expand Down
10 changes: 10 additions & 0 deletions lib/rails_interactive/templates/setup_graphql.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

run "rails db:prepare"
run "bundle add graphql"

Bundler.with_unbundled_env { run "bundle install" }

rails_command("generate graphql:install")

puts "GraphQL is installed!"

0 comments on commit 895cfe0

Please sign in to comment.