lib/generators/graphql/install_generator.rb in graphql-1.12.3 vs lib/generators/graphql/install_generator.rb in graphql-1.12.4

- old
+ new

@@ -1,8 +1,9 @@ # frozen_string_literal: true require 'rails/generators/base' require_relative 'core' +require_relative 'relay' module Graphql module Generators # Add GraphQL to a Rails app with `rails g graphql:install`. # @@ -48,10 +49,11 @@ # Use `--no-graphiql` to skip `graphiql-rails` installation. # # TODO: also add base classes class InstallGenerator < Rails::Generators::Base include Core + include Relay desc "Install GraphQL folder structure and boilerplate code" source_root File.expand_path('../templates', __FILE__) class_option :schema, @@ -162,10 +164,10 @@ end end end if options[:relay] - generate("graphql:relay") + install_relay end if gemfile_modified? say "Gemfile has been modified, make sure you `bundle install`" end