Skip to content

Enable pure string creation with documentMode:string in v7 #10873

Description

@dohomi

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions