Module: Rails::GraphQL::Field::OutputField::Proxied
- Defined in:
- lib/rails/graphql/field/output_field.rb
Overview
:nodoc: all
Instance Method Summary collapse
- #all_arguments ⇒ Object
-
#all_events ⇒ Object
TODO: Break events into directive/type/local because type events should only be added from the proxy.
- #all_listeners ⇒ Object
- #arguments? ⇒ Boolean
- #events? ⇒ Boolean
- #has_argument?(name) ⇒ Boolean
- #has_arguments? ⇒ Boolean
- #listeners? ⇒ Boolean
Instance Method Details
#all_arguments ⇒ Object
34 35 36 37 38 |
# File 'lib/rails/graphql/field/output_field.rb', line 34 def all_arguments inherited = field.all_arguments return inherited unless defined?(@arguments) inherited.blank? ? super : inherited.merge(super) end |
#all_events ⇒ Object
TODO: Break events into directive/type/local because type events should only be added from the proxy
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/rails/graphql/field/output_field.rb', line 55 def all_events if (inherited = super).nil? field.all_events elsif (proxied = field.all_events).nil? inherited else # The order is reversed because events from # the proxy must come first Helpers.merge_hash_array(proxied, inherited) end end |
#all_listeners ⇒ Object
71 72 73 74 75 76 77 78 79 |
# File 'lib/rails/graphql/field/output_field.rb', line 71 def all_listeners if (inherited = super).nil? field.all_listeners elsif (proxied = field.all_listeners).nil? inherited else proxied + inherited end end |
#arguments? ⇒ Boolean
48 49 50 |
# File 'lib/rails/graphql/field/output_field.rb', line 48 def arguments? super || field.arguments? end |
#events? ⇒ Boolean
67 68 69 |
# File 'lib/rails/graphql/field/output_field.rb', line 67 def events? super || field.events? end |
#has_argument?(name) ⇒ Boolean
40 41 42 |
# File 'lib/rails/graphql/field/output_field.rb', line 40 def has_argument?(name) super || field.has_argument?(name) end |
#has_arguments? ⇒ Boolean
44 45 46 |
# File 'lib/rails/graphql/field/output_field.rb', line 44 def has_arguments? super || field.has_arguments? end |
#listeners? ⇒ Boolean
81 82 83 |
# File 'lib/rails/graphql/field/output_field.rb', line 81 def listeners? super || field.listeners? end |