Class: Google::Apis::FirebasedataconnectV1beta::GraphqlError

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

GraphqlError conforms to the GraphQL error spec. https://spec.graphql.org/ draft/#sec-Errors Firebase SQL 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.



600
601
602
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 600

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

Instance Attribute Details

#extensionsGoogle::Apis::FirebasedataconnectV1beta::GraphqlErrorExtensions

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



573
574
575
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 573

def extensions
  @extensions
end

#locationsArray<Google::Apis::FirebasedataconnectV1beta::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



584
585
586
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 584

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)


590
591
592
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 590

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>)


598
599
600
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 598

def path
  @path
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



605
606
607
608
609
610
# File 'lib/google/apis/firebasedataconnect_v1beta/classes.rb', line 605

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