Skip to content

Commit a94bb01

Browse files
authored
Next.js 16 (#514)
* Next.js 16 * changeset
1 parent c2d538b commit a94bb01

File tree

7 files changed

+441
-10
lines changed

7 files changed

+441
-10
lines changed

.changeset/large-penguins-marry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@apollo/client-integration-nextjs": patch
3+
---
4+
5+
Update peer dependencies for `next` to allow usage with `^16.0.0`.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3+
import "./.next/types/routes.d.ts";
34

45
// NOTE: This file should not be edited
56
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

integration-test/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "next dev",
7-
"build": "next build",
7+
"build": "next build --webpack",
88
"start": "next start",
99
"build-and-test": "yarn build && yarn test",
1010
"test": "yarn test:nextjs"
@@ -22,7 +22,7 @@
2222
"graphql": "^16.7.1",
2323
"graphql-17-alpha2": "npm:[email protected]",
2424
"graphql-tag": "^2.12.6",
25-
"next": "^15.2.4",
25+
"next": "^16.0.0",
2626
"react": "^19.0.0",
2727
"react-dom": "^19.0.0",
2828
"react-error-boundary": "^4.0.13",

integration-test/nextjs/src/middleware.ts renamed to integration-test/nextjs/src/proxy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NextRequest, NextResponse } from "next/server";
22

3-
export function middleware(request: NextRequest) {
3+
export function proxy(request: NextRequest) {
44
const nonce = request.nextUrl.searchParams.get("nonce");
55
if (nonce) {
66
// we set a fixed nonce here so we can test correct and incorrect nonce values

integration-test/nextjs/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"moduleResolution": "node",
1717
"resolveJsonModule": true,
1818
"isolatedModules": true,
19-
"jsx": "preserve",
19+
"jsx": "react-jsx",
2020
"incremental": true,
2121
"plugins": [
2222
{
@@ -35,8 +35,9 @@
3535
"**/*.tsx",
3636
".next/types/**/*.ts",
3737
"../shared/*.ts",
38+
".next/dev/types/**/*.ts"
3839
],
3940
"exclude": [
4041
"node_modules"
4142
]
42-
}
43+
}

packages/nextjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"esbuild": "^0.24.2",
9191
"eslint": "8.57.0",
9292
"graphql": "^16.10.0",
93-
"next": "^15.2.4",
93+
"next": "^16.0.0",
9494
"publint": "0.2.7",
9595
"react": "^19.0.0",
9696
"react-dom": "^19.0.0",
@@ -102,7 +102,7 @@
102102
},
103103
"peerDependencies": {
104104
"@apollo/client": "^4.0.0",
105-
"next": "^15.2.3",
105+
"next": "^15.2.3 || ^16.0.0",
106106
"react": "^19",
107107
"rxjs": "^7.3.0"
108108
},

0 commit comments

Comments
 (0)