Class GraphQLWebSocketClient<TTypings>

Type Parameters

Constructors

Properties

graphqlSocket?: GraphQLClientWebSocket
protocol: string
url: string

Methods

  • Type Parameters

    • TData

    Parameters

    • payload: {
          operationName?: null | string;
          query: string;
          variables?: null | Record<string, unknown>;
      }
      • OptionaloperationName?: null | string
      • query: string
      • Optionalvariables?: null | Record<string, unknown>

    Returns AsyncPushIterator<ExecutionResult<TData, ObjMap<unknown>>>

  • Type Parameters

    • TData

    Parameters

    • payload: {
          operationName?: null | string;
          query: string;
          variables?: null | Record<string, unknown>;
      }
      • OptionaloperationName?: null | string
      • query: string
      • Optionalvariables?: null | Record<string, unknown>
    • options: {
          onData: ((data: TData) => unknown);
          onError: ((error: Error) => unknown);
      }
      • onData: ((data: TData) => unknown)
          • (data): unknown
          • Parameters

            Returns unknown

      • onError: ((error: Error) => unknown)
          • (error): unknown
          • Parameters

            • error: Error

            Returns unknown

    Returns (() => void)

      • (): void
      • Returns void