Module: GraphQL::Schema::Member::AcceptsDefinition::ToGraphQLExtension Private

Defined in:
lib/graphql/schema/member/accepts_definition.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#to_graphql(*args, **kwargs) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/graphql/schema/member/accepts_definition.rb', line 126

def to_graphql(*args, **kwargs)

  defn = if args.empty? && kwargs.empty?
    super()
  else
    super
  end
  accepts_definition_methods.each do |method_name|
    value = public_send(method_name)
    if !value.nil?
      defn = defn.redefine { public_send(method_name, *value) }
    end
  end
  defn
end