Skip to content

Commit

Permalink
Fix bug concerning as and prepare on arguments
Browse files Browse the repository at this point in the history
When using `as` and `prepare` in argument blocks, they were overwritten by
the default values.
  • Loading branch information
Tom Gehrke committed Jun 28, 2017
1 parent 13bb711 commit fccbcc0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/graphql/argument.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ def self.from_dsl(name, type = nil, description = nil, default_value: NO_DEFAULT
if default_value != NO_DEFAULT_VALUE
argument.default_value = default_value
end
argument.as = as
argument.prepare = prepare

as && argument.as = as
if prepare != DefaultPrepare
argument.prepare = prepare
end

argument
end
Expand Down

0 comments on commit fccbcc0

Please sign in to comment.