lib/rails/graphql/helpers/with_schema_fields.rb in rails-graphql-0.1.3 vs lib/rails/graphql/helpers/with_schema_fields.rb in rails-graphql-0.2.0

- old
+ new

@@ -187,10 +187,14 @@ end SCHEMA_FIELD_TYPES.each do |kind, type_name| class_eval <<-RUBY, __FILE__, __LINE__ + 1 def #{kind}_field?(name) - field?(:#{kind}, name) + has_field?(:#{kind}, name) + end + + def #{kind}_field(name) + find_field(:#{kind}, name) end def #{kind}_fields(&block) return @#{kind}_fields ||= Concurrent::Map.new if block.nil? configure_fields(:#{kind}, &block)