Support allowEnumStringTypes in typescript-operations

Author: smeyffretCreated Dec 31, 2021Updated Sep 25, 2026
Labelscore

Is your feature request related to a problem? Please describe.

I'm using allowEnumStringTypes option to be able to use the string representation of enums in my code, but this option is not handled by typescript-operations plugin, preventing me from using the string representation of enums as variables in my operations.

Describe the solution you'd like allowEnumStringTypes should be handled by typescript-operations to be consistent with typescript plugin.

Describe alternatives you've considered None

Additional context Example of generated type:

bash
export type GetTargetsQueryVariables = Exact<{
  id: Scalars['String'];
  type: TargetType;
}>;

Expected generated type:

bash
export type GetTargetsQueryVariables = Exact<{
  id: Scalars['String'];
  type: TargetType | `${TargetType}`;
}>;

Source: dotansimha/graphql-code-generator