Class: Google::Apis::FirebasedataconnectV1beta::GraphqlResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/firebasedataconnect_v1beta/classes.rb,
lib/google/apis/firebasedataconnect_v1beta/representations.rb,
lib/google/apis/firebasedataconnect_v1beta/representations.rb

Overview

The GraphQL response from Firebase Data Connect. It strives to match the GraphQL over HTTP spec. Note: Firebase Data Connect always responds with Content-Type: application/json. https://github.com/graphql/graphql-over-http/ blob/main/spec/GraphQLOverHTTP.md#body

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GraphqlResponse

Returns a new instance of GraphqlResponse.



461
462
463
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 461

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#dataHash<String,Object>

The result of the execution of the requested operation. If an error was raised before execution begins, the data entry should not be present in the result. ( a request error: https://spec.graphql.org/draft/#sec-Errors.Request-Errors) If an error was raised during the execution that prevented a valid response, the data entry in the response should be null. (a field error: https://spec. graphql.org/draft/#sec-Errors.Error-Result-Format) Corresponds to the JSON property data

Returns:

  • (Hash<String,Object>)


452
453
454
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 452

def data
  @data
end

#errorsArray<Google::Apis::FirebasedataconnectV1beta::GraphqlError>

Errors of this response. If the data entry in the response is not present, the errors entry must be present. It conforms to https://spec.graphql.org/draft/# sec-Errors. Corresponds to the JSON property errors



459
460
461
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 459

def errors
  @errors
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



466
467
468
469
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 466

def update!(**args)
  @data = args[:data] if args.key?(:data)
  @errors = args[:errors] if args.key?(:errors)
end