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

# Function Subscription

- Subscription(...options): (< O , OVERRIDESCLR , R >(operation, graphqlOptions?) => (< Z >(o, ops?) => SubscriptionToGraphQL < Z , GraphQLTypes [ R ], UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>))

- #### Parameters

  - `Rest` ...options: chainOptions

  #### Returns (< O , OVERRIDESCLR , R >(operation, graphqlOptions?) => (< Z >(o, ops?) => SubscriptionToGraphQL < Z , GraphQLTypes [ R ], UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>))

  - - < O , OVERRIDESCLR , R >(operation, graphqlOptions?): (< Z >(o, ops?) => SubscriptionToGraphQL < Z , GraphQLTypes [ R ], UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>)

    - #### Type Parameters

      - O extends "query" | "mutation"
      - OVERRIDESCLR extends ScalarDefinition
      - R extends keyof ValueTypes = GenericOperation < O >

      #### Parameters

      - operation: O
      - `Optional` graphqlOptions: ThunderGraphQLOptions < OVERRIDESCLR >

      #### Returns (< Z >(o, ops?) => SubscriptionToGraphQL < Z , GraphQLTypes [ R ], UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>)

      - - < Z >(o, ops?): SubscriptionToGraphQL < Z , GraphQLTypes [ R ], UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>

        - #### Type Parameters

          - Z extends unknown

          #### Parameters

          - o: Z & {
            [P in string | number | symbol]: P extends keyof ValueTypes [ R ]
            ? Z [P<P>]
            : never
            }
          - `Optional` ops: OperationOptions & {
            variables?: ExtractVariables < Z >;
            }

          #### Returns SubscriptionToGraphQL < Z , GraphQLTypes [ R ], UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>

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