lib/graphql/schema/argument.rb in graphql-2.0.1 vs lib/graphql/schema/argument.rb in graphql-2.0.2
- old
+ new
@@ -73,10 +73,13 @@
directives.each do |dir_class, dir_options|
directive(dir_class, **dir_options)
end
end
- self.validates(validates)
+ if validates && !validates.empty?
+ self.validates(validates)
+ end
+
if required == :nullable
self.owner.validates(required: { argument: arg_name })
end
if definition_block