@payloadcms/next 4.0.0-internal.532221d → 4.0.0-internal.567a487

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/routes/graphql/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqC,eAAe,EAAE,MAAM,SAAS,CAAA;AAqEjF,eAAO,MAAM,UAAU,WAAkB,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,iBAyBlF,CAAA;AAED,eAAO,MAAM,IAAI,WACN,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,eAAqB,OAAO,sBA6D9E,CAAA"}
1
+ {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/routes/graphql/handler.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAqC,eAAe,EAAE,MAAM,SAAS,CAAA;AAsEjF,eAAO,MAAM,UAAU,WAAkB,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,iBAyBlF,CAAA;AAED,eAAO,MAAM,IAAI,WACN,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,eAAqB,OAAO,sBAyE9E,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { configToSchema } from '@payloadcms/graphql';
2
2
  import { createHandler } from 'graphql-http/lib/use/fetch';
3
3
  import { status as httpStatus } from 'http-status';
4
- import { addDataAndFileToRequest, addLocalesToRequestFromData, createPayloadRequest, headersWithCors, logError, mergeHeaders } from 'payload';
4
+ import { addDataAndFileToRequest, addLocalesToRequestFromData, assertBranchReadable, createPayloadRequest, headersWithCors, logError, mergeHeaders } from 'payload';
5
5
  const handleError = async ({
6
6
  err,
7
7
  payload,
@@ -90,6 +90,22 @@ export const POST = config => async request => {
90
90
  status: 404
91
91
  });
92
92
  }
93
+ // GraphQL takes its branch the same way REST does — a query param on the request —
94
+ // so it needs the same gate (§12.5). Answered as a bare 403 rather than a GraphQL
95
+ // error body: the request is refused before any operation is parsed.
96
+ try {
97
+ await assertBranchReadable({
98
+ req
99
+ });
100
+ } catch (_err) {
101
+ return new Response(null, {
102
+ headers: headersWithCors({
103
+ headers: new Headers(),
104
+ req
105
+ }),
106
+ status: 403
107
+ });
108
+ }
93
109
  await addDataAndFileToRequest(req);
94
110
  addLocalesToRequestFromData(req);
95
111
  const {
@@ -1 +1 @@
1
- {"version":3,"file":"handler.js","names":["configToSchema","createHandler","status","httpStatus","addDataAndFileToRequest","addLocalesToRequestFromData","createPayloadRequest","headersWithCors","logError","mergeHeaders","handleError","err","payload","req","originalError","INTERNAL_SERVER_ERROR","errorMessage","message","config","debug","response","extensions","name","undefined","data","stack","statusCode","locations","path","hooks","afterError","reduce","promise","hook","result","context","error","graphqlResult","Promise","resolve","cached","global","_payload_graphql","graphql","getGraphql","process","env","NODE_ENV","resolvedConfig","schema","e","POST","request","originalRequest","clone","canSetHeaders","graphQL","disable","Response","validationRules","headers","apiResponse","onOperation","args","errors","all","map","_","defaultRules","concat","resHeaders","Headers","key","append","body","responseHeaders"],"sources":["../../../src/routes/graphql/handler.ts"],"sourcesContent":["import type { GraphQLError, GraphQLFormattedError } from 'graphql'\nimport type { APIError, Payload, PayloadRequest, SanitizedConfig } from 'payload'\n\nimport { configToSchema } from '@payloadcms/graphql'\nimport { createHandler } from 'graphql-http/lib/use/fetch'\nimport { status as httpStatus } from 'http-status'\nimport {\n addDataAndFileToRequest,\n addLocalesToRequestFromData,\n createPayloadRequest,\n headersWithCors,\n logError,\n mergeHeaders,\n} from 'payload'\n\nconst handleError = async ({\n err,\n payload,\n req,\n}: {\n err: GraphQLError\n payload: Payload\n req: PayloadRequest\n}): Promise<GraphQLFormattedError> => {\n const status = (err.originalError as APIError).status || httpStatus.INTERNAL_SERVER_ERROR\n let errorMessage = err.message\n logError({ err, payload })\n\n // Internal server errors can contain anything, including potentially sensitive data.\n // Therefore, error details will be hidden from the response unless `config.debug` is `true`\n if (!payload.config.debug && status === httpStatus.INTERNAL_SERVER_ERROR) {\n errorMessage = 'Something went wrong.'\n }\n\n let response: GraphQLFormattedError = {\n extensions: {\n name: err?.originalError?.name || undefined,\n data: (err && err.originalError && (err.originalError as APIError).data) || undefined,\n stack: payload.config.debug ? err.stack : undefined,\n statusCode: status,\n },\n locations: err.locations,\n message: errorMessage,\n path: err.path,\n }\n\n await payload.config.hooks.afterError?.reduce(async (promise, hook) => {\n await promise\n\n const result = await hook({\n context: req.context,\n error: err,\n graphqlResult: response,\n req,\n })\n\n if (result) {\n response = result.graphqlResult || response\n }\n }, Promise.resolve())\n\n return response\n}\n\nlet cached = global._payload_graphql\n\nif (!cached) {\n cached = global._payload_graphql = { graphql: null, promise: null }\n}\n\nexport const getGraphql = async (config: Promise<SanitizedConfig> | SanitizedConfig) => {\n if (process.env.NODE_ENV === 'development') {\n cached = global._payload_graphql = { graphql: null, promise: null }\n }\n\n if (cached.graphql) {\n return cached.graphql\n }\n\n if (!cached.promise) {\n const resolvedConfig = await config\n cached.promise = new Promise((resolve) => {\n const schema = configToSchema(resolvedConfig)\n resolve(cached.graphql || schema)\n })\n }\n\n try {\n cached.graphql = await cached.promise\n } catch (e) {\n cached.promise = null\n throw e\n }\n\n return cached.graphql\n}\n\nexport const POST =\n (config: Promise<SanitizedConfig> | SanitizedConfig) => async (request: Request) => {\n const originalRequest = request.clone()\n const req = await createPayloadRequest({\n canSetHeaders: true,\n config,\n request,\n })\n\n const { payload } = req\n\n if (payload.config.graphQL?.disable) {\n return new Response(null, {\n status: 404,\n })\n }\n\n await addDataAndFileToRequest(req)\n addLocalesToRequestFromData(req)\n\n const { schema, validationRules } = await getGraphql(config)\n\n const headers = {}\n const apiResponse = await createHandler({\n context: { headers, req },\n onOperation: async (request, args, result) => {\n const response =\n typeof payload.extensions === 'function'\n ? await payload.extensions({\n args,\n req: request,\n result,\n })\n : result\n if (response.errors) {\n const errors = (await Promise.all(\n result.errors.map((error) => {\n return handleError({ err: error, payload, req })\n }),\n )) as GraphQLError[]\n // errors type should be FormattedGraphQLError[] but onOperation has a return type of ExecutionResult instead of FormattedExecutionResult\n return { ...response, errors }\n }\n return response\n },\n schema,\n validationRules: (_, args, defaultRules) => defaultRules.concat(validationRules(args)),\n })(originalRequest)\n\n const resHeaders = headersWithCors({\n headers: new Headers(apiResponse.headers),\n req,\n })\n\n for (const key in headers) {\n resHeaders.append(key, headers[key])\n }\n\n return new Response(apiResponse.body, {\n headers: req.responseHeaders ? mergeHeaders(req.responseHeaders, resHeaders) : resHeaders,\n status: apiResponse.status,\n })\n }\n"],"mappings":"AAGA,SAASA,cAAc,QAAQ;AAC/B,SAASC,aAAa,QAAQ;AAC9B,SAASC,MAAA,IAAUC,UAAU,QAAQ;AACrC,SACEC,uBAAuB,EACvBC,2BAA2B,EAC3BC,oBAAoB,EACpBC,eAAe,EACfC,QAAQ,EACRC,YAAY,QACP;AAEP,MAAMC,WAAA,GAAc,MAAAA,CAAO;EACzBC,GAAG;EACHC,OAAO;EACPC;AAAG,CAKJ;EACC,MAAMX,MAAA,GAASS,GAAC,CAAIG,aAAa,CAAcZ,MAAM,IAAIC,UAAA,CAAWY,qBAAqB;EACzF,IAAIC,YAAA,GAAeL,GAAA,CAAIM,OAAO;EAC9BT,QAAA,CAAS;IAAEG,GAAA;IAAKC;EAAQ;EAExB;EACA;EACA,IAAI,CAACA,OAAA,CAAQM,MAAM,CAACC,KAAK,IAAIjB,MAAA,KAAWC,UAAA,CAAWY,qBAAqB,EAAE;IACxEC,YAAA,GAAe;EACjB;EAEA,IAAII,QAAA,GAAkC;IACpCC,UAAA,EAAY;MACVC,IAAA,EAAMX,GAAA,EAAKG,aAAA,EAAeQ,IAAA,IAAQC,SAAA;MAClCC,IAAA,EAAMb,GAAC,IAAOA,GAAA,CAAIG,aAAa,IAAIH,GAAC,CAAIG,aAAa,CAAcU,IAAI,IAAKD,SAAA;MAC5EE,KAAA,EAAOb,OAAA,CAAQM,MAAM,CAACC,KAAK,GAAGR,GAAA,CAAIc,KAAK,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B/B,MAAA,CAAO8B,MAAM,CAACE,GAAG,CAAE9B,KAAA;UACjB,OAAO1B,WAAA,CAAY;YAAEC,GAAA,EAAKyB,KAAA;YAAOxB,OAAA;YAASC;UAAI;QAChD;QAEF;QACA,OAAO;UAAE,GAAGO,QAAQ;UAAE4C;QAAO;MAC/B;MACA,OAAO5C,QAAA;IACT;IACA6B,MAAA;IACAU,eAAA,EAAiBA,CAACQ,CAAA,EAAGJ,IAAA,EAAMK,YAAA,KAAiBA,YAAA,CAAaC,MAAM,CAACV,eAAA,CAAgBI,IAAA;EAClF,GAAGV,eAAA;EAEH,MAAMiB,UAAA,GAAa/D,eAAA,CAAgB;IACjCqD,OAAA,EAAS,IAAIW,OAAA,CAAQV,WAAA,CAAYD,OAAO;IACxC/C;EACF;EAEA,KAAK,MAAM2D,GAAA,IAAOZ,OAAA,EAAS;IACzBU,UAAA,CAAWG,MAAM,CAACD,GAAA,EAAKZ,OAAO,CAACY,GAAA,CAAI;EACrC;EAEA,OAAO,IAAId,QAAA,CAASG,WAAA,CAAYa,IAAI,EAAE;IACpCd,OAAA,EAAS/C,GAAA,CAAI8D,eAAe,GAAGlE,YAAA,CAAaI,GAAA,CAAI8D,eAAe,EAAEL,UAAA,IAAcA,UAAA;IAC/EpE,MAAA,EAAQ2D,WAAA,CAAY3D;EACtB;AACF","ignoreList":[]}
1
+ {"version":3,"file":"handler.js","names":["configToSchema","createHandler","status","httpStatus","addDataAndFileToRequest","addLocalesToRequestFromData","assertBranchReadable","createPayloadRequest","headersWithCors","logError","mergeHeaders","handleError","err","payload","req","originalError","INTERNAL_SERVER_ERROR","errorMessage","message","config","debug","response","extensions","name","undefined","data","stack","statusCode","locations","path","hooks","afterError","reduce","promise","hook","result","context","error","graphqlResult","Promise","resolve","cached","global","_payload_graphql","graphql","getGraphql","process","env","NODE_ENV","resolvedConfig","schema","e","POST","request","originalRequest","clone","canSetHeaders","graphQL","disable","Response","_err","headers","Headers","validationRules","apiResponse","onOperation","args","errors","all","map","_","defaultRules","concat","resHeaders","key","append","body","responseHeaders"],"sources":["../../../src/routes/graphql/handler.ts"],"sourcesContent":["import type { GraphQLError, GraphQLFormattedError } from 'graphql'\nimport type { APIError, Payload, PayloadRequest, SanitizedConfig } from 'payload'\n\nimport { configToSchema } from '@payloadcms/graphql'\nimport { createHandler } from 'graphql-http/lib/use/fetch'\nimport { status as httpStatus } from 'http-status'\nimport {\n addDataAndFileToRequest,\n addLocalesToRequestFromData,\n assertBranchReadable,\n createPayloadRequest,\n headersWithCors,\n logError,\n mergeHeaders,\n} from 'payload'\n\nconst handleError = async ({\n err,\n payload,\n req,\n}: {\n err: GraphQLError\n payload: Payload\n req: PayloadRequest\n}): Promise<GraphQLFormattedError> => {\n const status = (err.originalError as APIError).status || httpStatus.INTERNAL_SERVER_ERROR\n let errorMessage = err.message\n logError({ err, payload })\n\n // Internal server errors can contain anything, including potentially sensitive data.\n // Therefore, error details will be hidden from the response unless `config.debug` is `true`\n if (!payload.config.debug && status === httpStatus.INTERNAL_SERVER_ERROR) {\n errorMessage = 'Something went wrong.'\n }\n\n let response: GraphQLFormattedError = {\n extensions: {\n name: err?.originalError?.name || undefined,\n data: (err && err.originalError && (err.originalError as APIError).data) || undefined,\n stack: payload.config.debug ? err.stack : undefined,\n statusCode: status,\n },\n locations: err.locations,\n message: errorMessage,\n path: err.path,\n }\n\n await payload.config.hooks.afterError?.reduce(async (promise, hook) => {\n await promise\n\n const result = await hook({\n context: req.context,\n error: err,\n graphqlResult: response,\n req,\n })\n\n if (result) {\n response = result.graphqlResult || response\n }\n }, Promise.resolve())\n\n return response\n}\n\nlet cached = global._payload_graphql\n\nif (!cached) {\n cached = global._payload_graphql = { graphql: null, promise: null }\n}\n\nexport const getGraphql = async (config: Promise<SanitizedConfig> | SanitizedConfig) => {\n if (process.env.NODE_ENV === 'development') {\n cached = global._payload_graphql = { graphql: null, promise: null }\n }\n\n if (cached.graphql) {\n return cached.graphql\n }\n\n if (!cached.promise) {\n const resolvedConfig = await config\n cached.promise = new Promise((resolve) => {\n const schema = configToSchema(resolvedConfig)\n resolve(cached.graphql || schema)\n })\n }\n\n try {\n cached.graphql = await cached.promise\n } catch (e) {\n cached.promise = null\n throw e\n }\n\n return cached.graphql\n}\n\nexport const POST =\n (config: Promise<SanitizedConfig> | SanitizedConfig) => async (request: Request) => {\n const originalRequest = request.clone()\n const req = await createPayloadRequest({\n canSetHeaders: true,\n config,\n request,\n })\n\n const { payload } = req\n\n if (payload.config.graphQL?.disable) {\n return new Response(null, {\n status: 404,\n })\n }\n\n // GraphQL takes its branch the same way REST does — a query param on the request —\n // so it needs the same gate (§12.5). Answered as a bare 403 rather than a GraphQL\n // error body: the request is refused before any operation is parsed.\n try {\n await assertBranchReadable({ req })\n } catch (_err) {\n return new Response(null, {\n headers: headersWithCors({ headers: new Headers(), req }),\n status: 403,\n })\n }\n\n await addDataAndFileToRequest(req)\n addLocalesToRequestFromData(req)\n\n const { schema, validationRules } = await getGraphql(config)\n\n const headers = {}\n const apiResponse = await createHandler({\n context: { headers, req },\n onOperation: async (request, args, result) => {\n const response =\n typeof payload.extensions === 'function'\n ? await payload.extensions({\n args,\n req: request,\n result,\n })\n : result\n if (response.errors) {\n const errors = (await Promise.all(\n result.errors.map((error) => {\n return handleError({ err: error, payload, req })\n }),\n )) as GraphQLError[]\n // errors type should be FormattedGraphQLError[] but onOperation has a return type of ExecutionResult instead of FormattedExecutionResult\n return { ...response, errors }\n }\n return response\n },\n schema,\n validationRules: (_, args, defaultRules) => defaultRules.concat(validationRules(args)),\n })(originalRequest)\n\n const resHeaders = headersWithCors({\n headers: new Headers(apiResponse.headers),\n req,\n })\n\n for (const key in headers) {\n resHeaders.append(key, headers[key])\n }\n\n return new Response(apiResponse.body, {\n headers: req.responseHeaders ? mergeHeaders(req.responseHeaders, resHeaders) : resHeaders,\n status: apiResponse.status,\n })\n }\n"],"mappings":"AAGA,SAASA,cAAc,QAAQ;AAC/B,SAASC,aAAa,QAAQ;AAC9B,SAASC,MAA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UAAE,GAAGO,QAAQ;UAAE8C;QAAO;MAC/B;MACA,OAAO9C,QAAA;IACT;IACA6B,MAAA;IACAa,eAAA,EAAiBA,CAACO,CAAA,EAAGJ,IAAA,EAAMK,YAAA,KAAiBA,YAAA,CAAaC,MAAM,CAACT,eAAA,CAAgBG,IAAA;EAClF,GAAGZ,eAAA;EAEH,MAAMmB,UAAA,GAAajE,eAAA,CAAgB;IACjCqD,OAAA,EAAS,IAAIC,OAAA,CAAQE,WAAA,CAAYH,OAAO;IACxC/C;EACF;EAEA,KAAK,MAAM4D,GAAA,IAAOb,OAAA,EAAS;IACzBY,UAAA,CAAWE,MAAM,CAACD,GAAA,EAAKb,OAAO,CAACa,GAAA,CAAI;EACrC;EAEA,OAAO,IAAIf,QAAA,CAASK,WAAA,CAAYY,IAAI,EAAE;IACpCf,OAAA,EAAS/C,GAAA,CAAI+D,eAAe,GAAGnE,YAAA,CAAaI,GAAA,CAAI+D,eAAe,EAAEJ,UAAA,IAAcA,UAAA;IAC/EvE,MAAA,EAAQ8D,WAAA,CAAY9D;EACtB;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/next",
3
- "version": "4.0.0-internal.532221d",
3
+ "version": "4.0.0-internal.567a487",
4
4
  "homepage": "https://payloadcms.com",
5
5
  "repository": {
6
6
  "type": "git",
@@ -84,9 +84,9 @@
84
84
  "qs-esm": "8.0.1",
85
85
  "sass": "1.77.4",
86
86
  "uuid": "14.0.0",
87
- "@payloadcms/graphql": "4.0.0-internal.532221d",
88
- "@payloadcms/translations": "4.0.0-internal.532221d",
89
- "@payloadcms/ui": "4.0.0-internal.532221d"
87
+ "@payloadcms/graphql": "4.0.0-internal.567a487",
88
+ "@payloadcms/ui": "4.0.0-internal.567a487",
89
+ "@payloadcms/translations": "4.0.0-internal.567a487"
90
90
  },
91
91
  "devDependencies": {
92
92
  "@babel/cli": "7.27.2",
@@ -94,7 +94,7 @@
94
94
  "@babel/preset-env": "7.27.2",
95
95
  "@babel/preset-react": "7.27.1",
96
96
  "@babel/preset-typescript": "7.27.1",
97
- "@next/eslint-plugin-next": "16.2.7",
97
+ "@next/eslint-plugin-next": "16.3.0",
98
98
  "@types/busboy": "1.5.4",
99
99
  "@types/react": "19.2.14",
100
100
  "@types/react-dom": "19.2.3",
@@ -103,12 +103,12 @@
103
103
  "esbuild-sass-plugin": "3.3.1",
104
104
  "swc-plugin-transform-remove-imports": "8.3.0",
105
105
  "@payloadcms/eslint-config": "3.28.0",
106
- "payload": "4.0.0-internal.532221d"
106
+ "payload": "4.0.0-internal.567a487"
107
107
  },
108
108
  "peerDependencies": {
109
109
  "graphql": "^16.8.1",
110
110
  "next": ">=16.2.6 <17.0.0",
111
- "payload": "4.0.0-internal.532221d"
111
+ "payload": "4.0.0-internal.567a487"
112
112
  },
113
113
  "engines": {
114
114
  "node": ">=24.15.0"