module GraphQL::Sugar::Function::ClassMethods
Public Instance Methods
parameter(name, *args, **kwargs, &block)
click to toggle source
Workaround: A `GraphQL::Function` is supposed to be a 'reusable container for field logic'. However, extended Field DSL (specified using `GraphQL::Field.accepts_definitions(…)`) is not available within Functions. Therefore, re-defining it here.
# File lib/graphql/sugar/function.rb, line 18 def parameter(name, *args, **kwargs, &block) kwargs[:as] ||= name.to_s.underscore.to_sym argument(name, *args, **kwargs, &block) end