Class: GraphQL::Relay::Mutation::Result
- Inherits:
-
Object
- Object
- GraphQL::Relay::Mutation::Result
- Defined in:
- lib/graphql/relay/mutation.rb
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Instance Method Summary collapse
- #clientMutationId ⇒ Object
-
#initialize(arguments:, result:) ⇒ Result
constructor
A new instance of Result.
- #method_missing(name, *args, &block) ⇒ Object
Constructor Details
#initialize(arguments:, result:) ⇒ Result
Returns a new instance of Result.
127 128 129 130 |
# File 'lib/graphql/relay/mutation.rb', line 127 def initialize(arguments:, result:) @arguments = arguments @result = result end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *args, &block) ⇒ Object
136 137 138 139 140 141 142 |
# File 'lib/graphql/relay/mutation.rb', line 136 def method_missing(name, *args, &block) if result.key?(name) result[name] else super end end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
126 127 128 |
# File 'lib/graphql/relay/mutation.rb', line 126 def arguments @arguments end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
126 127 128 |
# File 'lib/graphql/relay/mutation.rb', line 126 def result @result end |
Instance Method Details
#clientMutationId ⇒ Object
132 133 134 |
# File 'lib/graphql/relay/mutation.rb', line 132 def clientMutationId arguments[:input][:clientMutationId] end |