Sha256: 0f914f0b9718da73af7fe61f401791cfb78f44ec281e7cb5a479e07ce0c00e40
Contents?: true
Size: 522 Bytes
Versions: 101
Compression:
Stored size: 522 Bytes
Contents
# frozen_string_literal: true require 'generators/graphql/type_generator' module Graphql module Generators # Generate a scalar type by given name. # # ``` # rails g graphql:scalar Date # ``` class ScalarGenerator < TypeGeneratorBase desc "Create a GraphQL::ScalarType with the given name" source_root File.expand_path('../templates', __FILE__) def create_type_file template "scalar.erb", "#{options[:directory]}/types/#{type_file_name}.rb" end end end end
Version data entries
101 entries across 101 versions & 2 rubygems