lib/souls/generate/resolver.rb in souls-0.21.0 vs lib/souls/generate/resolver.rb in souls-0.21.1

- old
+ new

@@ -3,9 +3,10 @@ class << self ## Generate Resolver def resolver_head class_name: "souls" FileUtils.mkdir_p "./app/graphql/resolvers" unless Dir.exist? "./app/graphql/resolvers" file_path = "./app/graphql/resolvers/#{class_name.singularize}_search.rb" + return "Resolver already exist! #{file_path}" if File.exist? file_path @relation_params = [] return ["Resolver already exist! #{file_path}"] if File.exist? file_path File.open(file_path, "w") do |f| f.write <<~EOS module Resolvers