graphql-code-generator-community
graphql-code-generator-community copied to clipboard
[typescript-graphql-request] allow custom Sdk type
Is your feature request related to a problem? Please describe.
Currently, @graphql-codgen/typescript-graphql-request uses a hard-coded Sdk type. If the schema also has a Sdk type, this will cause a conflict.
Describe the solution you'd like
Allow the user to customize the Sdk type, for example by adding the sdkType option to the configuration.
Could also fix via hooks:
hooks: {
afterOneFileWrite: [
`sed -i -e "s|export type Sdk = ReturnType|export type MySdk = ReturnType|g"`,
]
}