graphql-code-generator
graphql-code-generator copied to clipboard
Added option to graphql-request for allowing generation of individua…
…l method exports as opposed to a wrapped sdk
Description
This new flag in typescript-graphql-request should offer the possibility to generate individual operation functions as opposed to wrapping everything in an expensive getSdk object.
This would allow compilers like webpack to correctly treeshake the code used and significantly decrease the initial bundle size for frontend apps
Related #6210
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [x] This change requires a documentation update
Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
- [ ] Test A
- [ ] Test B
Test Environment:
- OS:
@graphql-codegen/...:- NodeJS:
Checklist:
- [x] I have followed the CONTRIBUTING doc and the style guidelines of this project
- [x] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
⚠️ No Changeset found
Latest commit: b8d26a53108c81555fc645bd818e9a8e888d2acb
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
@cipriancaba is attempting to deploy a commit to the The Guild Team on Vercel.
A member of the Team first needs to authorize it.
Hey @charlypoly , do you have any input on this implementation?
any updates?
Hi @kaorun343,
We are waiting for the review request changes to be addressed: https://github.com/dotansimha/graphql-code-generator/pull/8131#pullrequestreview-1052676585
Hi!
All community plugins (see list below) have been moved to a new dotansimha/graphql-code-generator-community.
Community plugins:
@graphql-codegen/typescript-react-apollo@graphql-codegen/typescript-graphql-request@graphql-codegen/typescript-apollo-angular@graphql-codegen/typescript-apollo-client-helpers@graphql-codegen/typescript-react-query@graphql-codegen/typescript-urql@graphql-codegen/named-operations-object@graphql-codegen/urql-introspection@graphql-codegen/flow-resolvers@graphql-codegen/typescript-vue-apollo@graphql-codegen/typescript-rtk-query@graphql-codegen/flow-operations@graphql-codegen/typescript-msw@graphql-codegen/typescript-mongodb@graphql-codegen/typescript-type-graphql@graphql-codegen/jsdoc@graphql-codegen/typescript-vue-urql@graphql-codegen/kotlin@graphql-codegen/typescript-vue-apollo-smart-ops@graphql-codegen/java@graphql-codegen/c-sharp-operations@graphql-codegen/hasura-allow-list@graphql-codegen/typescript-stencil-apollo@graphql-codegen/relay-operation-optimizer@graphql-codegen/typescript-oclif@graphql-codegen/java-resolvers@graphql-codegen/java-apollo-android@graphql-codegen/flutter-freezed
Please move your PR by following these steps:
From your current PR branch:
- Fork the https://github.com/dotansimha/graphql-code-generator-community repository
- git remote add codegen-community <GIT_URL_OF_YOUR_COMMUNITY_REPO_FORK>
- git fetch codegen-community
- git push codegen-community
Open the PR on dotansimha/graphql-code-generator-community and close this PR.
Thank you!
please open PR in community repo