Class: GraphQL::Extras::Test::Response::Error
- Inherits:
-
Object
- Object
- GraphQL::Extras::Test::Response::Error
- Defined in:
- lib/graphql/extras/test/response.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#extensions ⇒ Object
readonly
Returns the value of attribute extensions.
-
#locations ⇒ Object
readonly
Returns the value of attribute locations.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(payload) ⇒ Error
Returns a new instance of Error.
26 27 28 29 30 31 32 |
# File 'lib/graphql/extras/test/response.rb', line 26 def initialize(payload) = payload["message"] @path = payload["path"] @locations = payload["locations"] @extensions = payload["extensions"] @code = payload.dig("extensions", "code") end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
22 23 24 |
# File 'lib/graphql/extras/test/response.rb', line 22 def code @code end |
#extensions ⇒ Object (readonly)
Returns the value of attribute extensions.
21 22 23 |
# File 'lib/graphql/extras/test/response.rb', line 21 def extensions @extensions end |
#locations ⇒ Object (readonly)
Returns the value of attribute locations.
24 25 26 |
# File 'lib/graphql/extras/test/response.rb', line 24 def locations @locations end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
20 21 22 |
# File 'lib/graphql/extras/test/response.rb', line 20 def end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
23 24 25 |
# File 'lib/graphql/extras/test/response.rb', line 23 def path @path end |