# SubscriptionToGraphQL | @coopenomics/sdk
Documentation for @coopenomics/sdk

# Type alias SubscriptionToGraphQL<Z, T, SCLR>

SubscriptionToGraphQL< Z , T , SCLR >: {
error: ((fn) => void);
off: ((fn) => void);
on: ((fn) => void);
open: (() => void);
ws: WebSocket;
}

#### Type Parameters

- Z
- T
- SCLR extends ScalarDefinition

#### Type declaration

- ##### error: ((fn) => void)

  - - (fn): void

    - #### Parameters

      - fn: ((e) => void)
        - - (e): void

          - #### Parameters

            - e: {
              data?: InputType < T , Z , SCLR >;
              errors?: string[];
              }

              - ##### `Optional` data?: InputType < T , Z , SCLR >

              - ##### `Optional` errors?: string[]

            #### Returns void

- ##### off: ((fn) => void)

  - - (fn): void

    - #### Parameters

      - fn: ((e) => void)
        - - (e): void

          - #### Parameters

            - e: {
              code?: number;
              data?: InputType < T , Z , SCLR >;
              message?: string;
              reason?: string;
              }

              - ##### `Optional` code?: number

              - ##### `Optional` data?: InputType < T , Z , SCLR >

              - ##### `Optional` message?: string

              - ##### `Optional` reason?: string

            #### Returns void

- ##### on: ((fn) => void)

  - - (fn): void

    - #### Parameters

      - fn: ((args) => void)
        - - (args): void

          - #### Parameters

            - args: InputType < T , Z , SCLR >

            #### Returns void

- ##### open: (() => void)

  - - (): void

    - #### Returns void

- ##### ws: WebSocket

- Defined in components/sdk/src/zeus/index.ts:807