dotansimha / dotansimha/graphql-code-generator
Enable pure string creation with documentMode:string in v7
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Is your feature request related to a problem? Please describe.
I am using codegen for the past 5 years with several community versions like `typescript-graphql-request` and `typescript-react-query`. The produced code was at runtime always just a string which was fine because I would only use the hooks or sdk and everything stays type safe in my codebase.
The footprint for the client app was minimal, no `graphql` or any other lib needed at dependency, only devDependency as the end result was a `string`.
### Describe the solution you'd like
After v7 upgrade all the strings are getting converted into `new TypedDocumentString ` which requires a client lib for the use in my client app. This in my opinion should not be the case for `documentMode: "string"`, first its quite confusing and also a regression in terms of bundle size of the final app generated code.
### Describe alternatives you've considered
If users choose `documentMode:"string"` the final output of generated code should stay a string and should not create a TypedDocumentString
### Any additional important details?
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.