Skip to content

Commit

Permalink
Merge pull request #1843 from swalkinshaw/fix-field-definition-block-…
Browse files Browse the repository at this point in the history
…yielding

Update how Schema::Field executes definition_block
  • Loading branch information
Robert Mosolgo authored Sep 10, 2018
2 parents 7e0dba7 + 2d48ac3 commit 132e274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/graphql/schema/field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def initialize(type: nil, name: nil, owner: nil, null: nil, field: nil, function

if definition_block
if definition_block.arity == 1
instance_exec(self, &definition_block)
yield self
else
instance_eval(&definition_block)
end
Expand Down

0 comments on commit 132e274

Please sign in to comment.