lib/graphql/directive/include_directive.rb in graphql-0.12.1 vs lib/graphql/directive/include_directive.rb in graphql-0.13.0

- old
+ new

@@ -1,14 +1,10 @@ GraphQL::Directive::IncludeDirective = GraphQL::Directive.define do name "include" description "Include this part of the query if `if` is true" - on([GraphQL::Directive::ON_FIELD, GraphQL::Directive::ON_FRAGMENT]) + locations([GraphQL::Directive::FIELD, GraphQL::Directive::FRAGMENT_SPREAD, GraphQL::Directive::INLINE_FRAGMENT]) argument :if, !GraphQL::BOOLEAN_TYPE - resolve -> (arguments, proc) { - if arguments["if"] - proc.call - else - nil - end + include_proc -> (arguments) { + arguments["if"] } end