Type alias GeneratedSubscription<InputType, OutputType>

GeneratedSubscription<InputType, OutputType>: string & {
    __generatedSubscriptionInput: InputType;
    __generatedSubscriptionOutput: OutputType;
}

Nominal type for branding generated graphql mutation operation strings with input and output types.

E.g.,

export const createWidget = `...` as GeneratedMutation<
CreateWidgetMutationVariables,
CreateWidgetMutation
>;

This allows graphql() to extract InputType and OutputType to correctly assign types to the variables and result objects.

Type Parameters

  • InputType

  • OutputType

Type declaration