Sha256: 783604b3fc12dd3c167b98fa75f6cf9b22bcf8c7eb866b682082d9172f970983
Contents?: true
Size: 530 Bytes
Versions: 4
Compression:
Stored size: 530 Bytes
Contents
require 'rails/generators' module CmGraphql module Generators class AddGraphqlGenerator < Rails::Generators::Base source_root File.expand_path('templates', __dir__) def add_graphql generate 'graphql:install' template 'graphql_schema.rb', "app/graphql/#{Rails.application.class.module_parent_name.underscore}_schema.rb" gsub_file 'app/controllers/graphql_controller.rb', '# protect_from_forgery with: :null_session', 'protect_from_forgery with: :null_session' end end end end
Version data entries
4 entries across 4 versions & 1 rubygems