Class: Google::Apis::FirebasedataconnectV1::GraphqlError

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

Overview

GraphqlError conforms to the GraphQL error spec. https://spec.graphql.org/ draft/#sec-Errors Firebase Data Connect API surfaces GraphqlError in various APIs: - Upon compile error, UpdateSchema and UpdateConnector return Code. Invalid_Argument with a list of GraphqlError in error details. - Upon query compile error, ExecuteGraphql, ExecuteGraphqlRead and IntrospectGraphql return Code.OK with a list of GraphqlError in response body. - Upon query execution error, ExecuteGraphql, ExecuteGraphqlRead, ExecuteMutation, ExecuteQuery, IntrospectGraphql, ImpersonateQuery and ImpersonateMutation all return Code.OK with a list of GraphqlError in response body.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GraphqlError

Returns a new instance of GraphqlError.



451
452
453
# File 'lib/google/apis/firebasedataconnect_v1/classes.rb', line 451

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

Instance Attribute Details

#extensionsGoogle::Apis::FirebasedataconnectV1::GraphqlErrorExtensions

GraphqlErrorExtensions contains additional information of GraphqlError. Corresponds to the JSON property extensions



424
425
426
# File 'lib/google/apis/firebasedataconnect_v1/classes.rb', line 424

def extensions
  @extensions
end

#locationsArray<Google::Apis::FirebasedataconnectV1::SourceLocation>

The source locations where the error occurred. Locations should help developers and toolings identify the source of error quickly. Included in admin endpoints (ExecuteGraphql, ExecuteGraphqlRead, IntrospectGraphql, ImpersonateQuery, ImpersonateMutation, UpdateSchema and UpdateConnector) to reference the provided GraphQL GQL document. Omitted in ExecuteMutation and ExecuteQuery since the caller shouldn't have access access the underlying GQL source. Corresponds to the JSON property locations



435
436
437
# File 'lib/google/apis/firebasedataconnect_v1/classes.rb', line 435

def locations
  @locations
end

#messageString

The detailed error message. The message should help developer understand the underlying problem without leaking internal data. Corresponds to the JSON property message

Returns:

  • (String)


441
442
443
# File 'lib/google/apis/firebasedataconnect_v1/classes.rb', line 441

def message
  @message
end

#pathArray<Object>

The result field which could not be populated due to error. Clients can use path to identify whether a null result is intentional or caused by a runtime error. It should be a list of string or index from the root of GraphQL query document. Corresponds to the JSON property path

Returns:

  • (Array<Object>)


449
450
451
# File 'lib/google/apis/firebasedataconnect_v1/classes.rb', line 449

def path
  @path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



456
457
458
459
460
461
# File 'lib/google/apis/firebasedataconnect_v1/classes.rb', line 456

def update!(**args)
  @extensions = args[:extensions] if args.key?(:extensions)
  @locations = args[:locations] if args.key?(:locations)
  @message = args[:message] if args.key?(:message)
  @path = args[:path] if args.key?(:path)
end