View Source GraphQLWSClient.Event (GraphQL Websocket Client v1.0.2)

A event for a subscription.

The struct consists of these fields:

  • :subscription_id - A UUID identifying the subscription. This matches the subscription ID that is returned by GraphQLWSClient.subscribe/3.
  • :status - Indicates whether the event contains the result data (:ok) or an error (:error).
  • :result - The payload, either the result or error data, dependent on the :status field.

Link to this section Summary

Link to this section Types

@type error() :: %GraphQLWSClient.Event{
  result: Exception.t(),
  status: :error,
  subscription_id: GraphQLWSClient.subscription_id()
}
@type ok() :: %GraphQLWSClient.Event{
  result: any(),
  status: :ok,
  subscription_id: GraphQLWSClient.subscription_id()
}
@type t() :: ok() | error()