Interface GraphQLSubscription.Handler<T>

Enclosing class:
GraphQLSubscription

public static interface GraphQLSubscription.Handler<T>
Receives the events of one subscription. All methods run on the Codename One EDT.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    The subscription ended cleanly (server complete, or a caller GraphQLSubscription.cancel()).
    void
    The subscription failed (an error message, a transport error, or a non-clean close).
    void
    A next payload arrived and its data mapped to T.
  • Method Details

    • onNext

      void onNext(GraphQLResponse<T> response)
      A next payload arrived and its data mapped to T. When the payload also carried errors, response.hasErrors() is true and response.getData() may still be non-null.
    • onError

      void onError(GraphQLResponse<T> response)
      The subscription failed (an error message, a transport error, or a non-clean close). No further events follow.
    • onComplete

      void onComplete()
      The subscription ended cleanly (server complete, or a caller GraphQLSubscription.cancel()). No further events follow.