Skip to content

Commit d259666

Browse files
refactor!: move Apollo Server dependencies to optional peerDependencies (#29)
* feat: move Apollo Server dependencies to optional peerDependencies - Move @apollo/server, @apollo/utils.withrequired, and @as-integrations/h3 to peerDependencies - Mark all Apollo dependencies as optional in peerDependenciesMeta - Update README installation instructions for Apollo Server users - GraphQL Yoga users no longer need to install Apollo dependencies - Apollo Server users must manually install required packages * fix: remove unused Apollo dependencies from pnpm-lock.yaml * chore: update dependencies in pnpm-workspace.yaml - upgraded '@antfu/eslint-config' to ^5.2.1 - updated '@graphql-tools/graphql-file-loader' to ^8.1.0 - updated '@graphql-tools/load' to ^8.1.2 - upgraded '@graphql-tools/merge' to ^9.1.1 - upgraded '@graphql-tools/schema' to ^10.0.25 - updated '@graphql-tools/utils' to ^10.9.1 - upgraded '@types/node' to ^22.18.0 - updated 'bumpp' to ^10.2.3 - upgraded 'eslint' to ^9.34.0 - updated 'nitropack' to ^2.12.4 - upgraded 'oxc-parser' to ^0.82.3 - updated 'tailwindcss' to ^4.1.12 - upgraded 'tsdown' to ^0.14.2 - updated 'typescript' to ^5.9.2 - upgraded 'vue' to ^3.5.20 - updated 'zod' to ^4.1.3 * chore: lock
1 parent a91a15c commit d259666

File tree

4 files changed

+1627
-2390
lines changed

4 files changed

+1627
-2390
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,13 @@ yarn add nitro-graphql graphql-yoga graphql
6767
**For Apollo Server:**
6868
```bash
6969
# npm
70-
npm install nitro-graphql @apollo/server graphql
70+
npm install nitro-graphql @apollo/server @apollo/utils.withrequired @as-integrations/h3 graphql
7171

7272
# pnpm (recommended)
73-
pnpm add nitro-graphql @apollo/server graphql
73+
pnpm add nitro-graphql @apollo/server @apollo/utils.withrequired @as-integrations/h3 graphql
7474

7575
# yarn
76-
yarn add nitro-graphql @apollo/server graphql
76+
yarn add nitro-graphql @apollo/server @apollo/utils.withrequired @as-integrations/h3 graphql
7777
```
7878

7979
### Step 2: Setup Your Project

package.json

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "nitro-graphql",
33
"type": "module",
4-
"version": "1.2.2",
5-
"packageManager": "pnpm@10.13.1",
4+
"version": "1.2.3",
5+
"packageManager": "pnpm@10.15.0",
66
"description": "GraphQL integration for Nitro",
77
"license": "MIT",
88
"sideEffects": false,
@@ -66,13 +66,25 @@
6666
"lint:fix": "eslint . --fix"
6767
},
6868
"peerDependencies": {
69+
"@apollo/server": "^5.0.0",
70+
"@apollo/utils.withrequired": "^3.0.0",
71+
"@as-integrations/h3": "^2.0.0",
6972
"graphql": "^16.11.0",
7073
"h3": "^1.15.3",
7174
"nitropack": "^2.11.13"
7275
},
76+
"peerDependenciesMeta": {
77+
"@apollo/server": {
78+
"optional": true
79+
},
80+
"@apollo/utils.withrequired": {
81+
"optional": true
82+
},
83+
"@as-integrations/h3": {
84+
"optional": true
85+
}
86+
},
7387
"dependencies": {
74-
"@apollo/utils.withrequired": "catalog:",
75-
"@as-integrations/h3": "catalog:",
7688
"@graphql-codegen/core": "catalog:",
7789
"@graphql-codegen/typescript": "catalog:",
7890
"@graphql-codegen/typescript-generic-sdk": "catalog:",
@@ -98,7 +110,6 @@
98110
},
99111
"devDependencies": {
100112
"@antfu/eslint-config": "catalog:",
101-
"@apollo/server": "catalog:",
102113
"@graphql-codegen/import-types-preset": "catalog:",
103114
"@nuxt/kit": "catalog:",
104115
"@nuxt/schema": "catalog:",

0 commit comments

Comments
 (0)