graphql-code-generator
graphql-code-generator copied to clipboard
GraphQL Code Generator v3: RFC umbrella PR
- [x] Remove
augmentedModuleNameand expose agraphql()instead ofgql()- [x] update preset generation code
- [x] ensure
graphql-toolsloaders can identify thosegraphql()calls - [x] rename babel-plugin → babel-optimizer-plugin
- [x] stop forwarding
plugins(config) totypescriptandtypescript-operationsplugin - [x] Target codegen config design
const config = {
schema: 'https://swapi-graphql.netlify.app/.netlify/functions/index',
documents: ['src/**/*.tsx'],
generates: {
'./src/gql/': {
preset: 'client',
plugins: [],
},
},
};
export default config;
- [x]
documentsoverride (exclusion of generate path) - [ ] ~handling of
.graphqlfiles? (withtyped-document-nodeunder the hood)~ - [x] remove “(using EXPERIMENTAL preset "gql-tag-operations-preset")” warning
- [x] ship
client-presetby default via the CLI package- [x] update
initaccordingly
- [x] update
- [x] TypeScript config first
Post-release TODOs
- [ ] deprecate
gql-tag-operations-preset:
npm deprecate @graphql-codegen/gql-tag-operations-preset "
gql-tag-operations-presetis deprecated in favor ofclient-preset"
🦋 Changeset detected
Latest commit: 5ea6d6807bd4b4f84e00504039cefc72dc6a8100
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 5 packages
| Name | Type |
|---|---|
| @graphql-codegen/cli | Major |
| @graphql-cli/codegen | Major |
| @graphql-codegen/gql-tag-operations | Minor |
| @graphql-codegen/client-preset | Patch |
| @graphql-codegen/gql-tag-operations-preset | Minor |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Updated |
|---|---|---|---|
| graphql-code-generator | ✅ Ready (Inspect) | Visit Preview | Aug 29, 2022 at 10:47AM (UTC) |
🚀 Snapshot Release (v3rfc)
The latest changes of this PR are available as v3rfc on npm (based on the declared changesets):
| Package | Version | Info |
|---|---|---|
@graphql-cli/codegen |
3.0.0-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/cli |
3.0.0-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/gql-tag-operations |
1.5.0-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-graphql-request |
4.5.4-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/typescript-rtk-query |
2.3.4-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/client-preset |
1.0.1-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
@graphql-codegen/gql-tag-operations-preset |
1.6.0-v3rfc-20220829104332-c07568002 |
npm ↗︎ unpkg ↗︎ |
/theguild newsletter blog
ESM support blocked by same issue as https://github.com/dotansimha/graphql-code-generator/issues/8212
Just wanted to mention it here so it does not go "forgotten", we should document how to consume the ypings in your custom graphql fetcher implementation e.g. for library authors, https://github.com/dotansimha/graphql-code-generator/blob/7f2f050256c200d948bd7a9df3e6df72f01eb8bd/examples/typescript-esm/src/executeOperation.ts#L6-L10