Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6ce1b36
fix(next): add optional params arg to GET handler for Next 15.2 compa…
rubixvi Aug 20, 2025
5c990ba
fix(next): add optional params arg to GET handler for Next 15.2 compa…
rubixvi Aug 20, 2025
713e0e2
fix(next): make handlerBuilder args optional for Next 15.2 route hand…
rubixvi Aug 20, 2025
0adc383
fix(next): args.params guard to prevent runtime errors when handlers …
rubixvi Aug 20, 2025
9e55072
fix(nextjs): update REST and handlerBuilder params for Next 15.2 comp…
rubixvi Aug 20, 2025
c2355e3
fix(graphql): add proper type for Next.js route params in POST handler
rubixvi Aug 20, 2025
d713e31
fix(graphql-playground): type params as Next.js route context in GET …
rubixvi Aug 20, 2025
c62032f
fix(graphql): add proper type for Next.js route params in POST handler
rubixvi Aug 20, 2025
56f0c80
fix(template): update GET handler to use NextRequest for Next.js 15.2
rubixvi Aug 20, 2025
667aae2
fix(template): update GET handler to use NextRequest for Next.js 15.2
rubixvi Aug 20, 2025
99cdb5d
fix(next): add optional params arg to GET handler for Next 15.5 compa…
rubixvi Aug 20, 2025
1849c51
fix(next): add optional params arg to GET handler for Next 15.5 compa…
rubixvi Aug 20, 2025
97711a4
fix(next): make handlerBuilder args optional for Next 15.5 route hand…
rubixvi Aug 20, 2025
fb2d92c
fix(next): args.params guard to prevent runtime errors when handlers …
rubixvi Aug 20, 2025
72eeebe
fix(nextjs): update REST and handlerBuilder params for Next 15.5 comp…
rubixvi Aug 20, 2025
b97a2ef
fix(graphql): add proper type for Next.js route params in POST handler
rubixvi Aug 20, 2025
4d10d3d
fix(graphql-playground): type params as Next.js route context in GET …
rubixvi Aug 20, 2025
b1372c6
fix(graphql): add proper type for Next.js route params in POST handler
rubixvi Aug 20, 2025
1e44d13
fix(template): update GET handler to use NextRequest for Next.js 15.5
rubixvi Aug 20, 2025
7432cd1
fix(template): update GET handler to use NextRequest for Next.js 15.5
rubixvi Aug 20, 2025
af0b2e5
Merge branches 'main' and 'main' of github.com:rubixvi/payload
rubixvi Aug 21, 2025
0588b61
rm _params and require args
jacobsfletch Aug 21, 2025
a172849
revert changes to path formatting
jacobsfletch Aug 21, 2025
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
2 changes: 1 addition & 1 deletion packages/next/src/routes/rest/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const handlerBuilder =
async (
request: Request,
args: {
params: Promise<{ slug: string[] }>
params: Promise<{ slug?: string[] }>
},
): Promise<Response> => {
const awaitedConfig = await config
Expand Down
11 changes: 2 additions & 9 deletions templates/website/src/app/(frontend)/next/preview/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@ import { getPayload } from 'payload'

import { draftMode } from 'next/headers'
import { redirect } from 'next/navigation'
import { NextRequest } from "next/server"

import configPromise from '@payload-config'

export async function GET(
req: {
cookies: {
get: (name: string) => {
value: string
}
}
} & Request,
): Promise<Response> {
export async function GET(req: NextRequest): Promise<Response> {
const payload = await getPayload({ config: configPromise })

const { searchParams } = new URL(req.url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,11 @@ import { getPayload } from 'payload'

import { draftMode } from 'next/headers'
import { redirect } from 'next/navigation'
import { NextRequest } from "next/server"

import configPromise from '@payload-config'

export async function GET(
req: {
cookies: {
get: (name: string) => {
value: string
}
}
} & Request,
): Promise<Response> {
export async function GET(req: NextRequest): Promise<Response> {
const payload = await getPayload({ config: configPromise })

const { searchParams } = new URL(req.url)
Expand Down