Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include @graphql-codegen/client-preset in @graphql-codegen/cli by default #9601

Merged
merged 9 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/@graphql-codegen_cli-9601-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-codegen/cli": patch
---
dependencies updates:
- Added dependency [`@graphql-codegen/client-preset@^4.1.0` ↗︎](https://www.npmjs.com/package/@graphql-codegen/client-preset/v/4.1.0) (to `dependencies`)
5 changes: 5 additions & 0 deletions .changeset/quiet-flies-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@graphql-codegen/cli': patch
---

Include @graphql-codegen/client-preset in @graphql-codegen/cli by default
1 change: 0 additions & 1 deletion examples/persisted-documents-string-mode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"jest": "28.1.3",
"babel-jest": "28.1.3",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@babel/core": "7.22.8",
"@babel/preset-env": "7.22.7",
"@babel/preset-typescript": "7.22.5"
Expand Down
1 change: 0 additions & 1 deletion examples/persisted-documents/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"jest": "28.1.3",
"babel-jest": "28.1.3",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@babel/core": "7.22.8",
"@babel/preset-env": "7.22.7",
"@babel/preset-typescript": "7.22.5"
Expand Down
1 change: 0 additions & 1 deletion examples/react/apollo-client-defer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.11.18",
"@types/react": "^18.0.15",
Expand Down
1 change: 0 additions & 1 deletion examples/react/apollo-client-swc-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"devDependencies": {
"@graphql-codegen/client-preset-swc-plugin": "0.2.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/cli": "^5.0.0",
"@vitejs/plugin-react-swc": "^3.3.0",
"@types/react": "18.2.7",
Expand Down
1 change: 0 additions & 1 deletion examples/react/apollo-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-react": "^3.1.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.11.18",
Expand Down
1 change: 0 additions & 1 deletion examples/react/http-executor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-react": "^3.1.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.11.18",
Expand Down
1 change: 0 additions & 1 deletion examples/react/nextjs-swr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/schema-ast": "4.0.0",
"@graphql-codegen/client-preset-swc-plugin": "0.2.0",
"@types/node": "^18.11.18",
Expand Down
1 change: 0 additions & 1 deletion examples/react/tanstack-react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-react": "^3.1.0",
"@types/jest": "^27.5.2",
"@types/node": "^18.11.18",
Expand Down
1 change: 0 additions & 1 deletion examples/react/urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.10",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-react": "^3.1.0",
"typescript": "5.0.4",
"serve": "14.2.0",
Expand Down
3 changes: 1 addition & 2 deletions examples/typescript-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"version": "0.0.0",
"private": true,
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0"
"@graphql-codegen/cli": "5.0.0"
},
"dependencies": {
"@graphql-typed-document-node/core": "3.2.0",
Expand Down
1 change: 0 additions & 1 deletion examples/typescript-graphql-request/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"private": true,
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"babel-jest": "28.1.3",
"jest": "28.1.3"
},
Expand Down
1 change: 0 additions & 1 deletion examples/vite/vite-react-cts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"cypress": "12.12.0",
Expand Down
1 change: 0 additions & 1 deletion examples/vite/vite-react-mts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"cypress": "12.12.0",
Expand Down
1 change: 0 additions & 1 deletion examples/vite/vite-react-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"cypress": "12.12.0",
Expand Down
1 change: 0 additions & 1 deletion examples/vue/apollo-composable/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-vue": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^4.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/vue/urql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-vue": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^4.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/vue/villus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
},
"devDependencies": {
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/client-preset": "^4.1.0",
"@vitejs/plugin-vue": "^4.0.0",
"typescript": "^5.0.0",
"vite": "^4.1.0",
Expand Down
1 change: 0 additions & 1 deletion examples/yoga-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"jest": "28.1.3",
"babel-jest": "28.1.3",
"@graphql-codegen/cli": "5.0.0",
"@graphql-codegen/client-preset": "4.1.0",
"@babel/core": "7.22.8",
"@babel/preset-env": "7.22.7",
"@babel/preset-typescript": "7.22.5"
Expand Down
1 change: 1 addition & 0 deletions packages/graphql-codegen-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"@babel/generator": "^7.18.13",
"@babel/template": "^7.18.10",
"@babel/types": "^7.18.13",
"@graphql-codegen/client-preset": "^4.1.0",
"@graphql-codegen/core": "^4.0.0",
"@graphql-codegen/plugin-helpers": "^5.0.1",
"@graphql-tools/apollo-engine-loader": "^8.0.0",
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ After installing 3 packages:

```sh npm2yarn
npm i graphql
npm i -D typescript @graphql-codegen/cli @graphql-codegen/client-preset
npm i -D typescript @graphql-codegen/cli
```

and providing a simple configuration:
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ If you are looking for the **best way to leverage GraphQL Code Generator on your

#### Client

We recommend using [a `client` preset](/plugins/presets/preset-client) that has a recommended configuration for the client applications. You can follow one of the following guides:
We recommend using [a `client` preset](/plugins/presets/preset-client) that has a recommended configuration for the client applications. It's included in the `@graphql-codegen/cli` package by default. Follow one of the following guides to learn more:

- [React](/docs/guides/react-vue)
- [Vue](/docs/guides/react-vue)
Expand Down
2 changes: 1 addition & 1 deletion website/src/pages/docs/guides/api-testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npm i graphql-yoga
Install the following development dependencies:

```sh npm2yarn
npm i -D typescript ts-node @graphql-codegen/cli @graphql-codegen/client-preset jest @babel/core @babel/preset-env @babel/preset-typescript babel-jest @graphql-typed-document-node/core
npm i -D typescript ts-node @graphql-codegen/cli jest @babel/core @babel/preset-env @babel/preset-typescript babel-jest @graphql-typed-document-node/core
```

## Setup
Expand Down
6 changes: 3 additions & 3 deletions website/src/pages/docs/guides/react-vue.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,21 +51,21 @@ For most GraphQL clients and frameworks (React, Vue), install the following pack

```bash
yarn add graphql
yarn add -D typescript ts-node @graphql-codegen/cli @graphql-codegen/client-preset
yarn add -D typescript ts-node @graphql-codegen/cli
```

**For npm:**

```bash
npm i -S graphql
npm i -D typescript ts-node @graphql-codegen/cli @graphql-codegen/client-preset
npm i -D typescript ts-node @graphql-codegen/cli
```

**For pnpm:**

```bash
pnpm i graphql @graphql-typed-document-node/core
pnpm i -D typescript ts-node @graphql-codegen/cli @graphql-codegen/client-preset
pnpm i -D typescript ts-node @graphql-codegen/cli
```

<br />
Expand Down
19 changes: 12 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4251,16 +4251,16 @@
resolved "https://registry.yarnpkg.com/@types/trusted-types/-/trusted-types-2.0.2.tgz#fc25ad9943bcac11cceb8168db4f275e0e72e756"
integrity sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==

"@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==

"@types/unist@^3.0.0":
"@types/unist@*", "@types/unist@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.0.tgz#988ae8af1e5239e89f9fbb1ade4c935f4eeedf9a"
integrity sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==

"@types/unist@^2.0.0", "@types/unist@^2.0.2":
version "2.0.6"
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-2.0.6.tgz#250a7b16c3b91f672a24552ec64678eeb1d3a08d"
integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==

"@types/ws@^8.0.0":
version "8.5.4"
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-8.5.4.tgz#bb10e36116d6e570dd943735f86c933c1587b8a5"
Expand Down Expand Up @@ -8222,11 +8222,16 @@ [email protected]:
lru-cache "^7.14.1"
tslib "^2.3.1"

[email protected], graphql@^16.0.0, graphql@^16.6.0:
[email protected]:
version "16.6.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.6.0.tgz#c2dcffa4649db149f6282af726c8c83f1c7c5fdb"
integrity sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw==

graphql@^16.0.0, graphql@^16.6.0:
version "16.8.0"
resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.8.0.tgz#374478b7f27b2dc6153c8f42c1b80157f79d79d4"
integrity sha512-0oKGaR+y3qcS5mCu1vb7KG+a89vjn06C7Ihq/dDl3jA+A8B3TKomvi3CiEcVLJQGalbu8F52LxkOym7U5sSfbg==

gray-matter@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/gray-matter/-/gray-matter-4.0.3.tgz#e893c064825de73ea1f5f7d88c7a9f7274288798"
Expand Down