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

# Function Chain

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

- #### Parameters

  - `Rest` ...options: chainOptions

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

  - - < O , OVERRIDESCLR , R >(operation, graphqlOptions?): (< Z >(o, ops?) => Promise< InputType < GraphQLTypes [ R ], Z , 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?) => Promise< InputType < GraphQLTypes [ R ], Z , UnionOverrideKeys< ScalarDefinition , OVERRIDESCLR >>>)

      - - < Z >(o, ops?): Promise< InputType < GraphQLTypes [ R ], Z , 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?: Record<string, unknown>;
            }

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

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