v3.0.0-beta.109 (2024-09-26)
🚀 Features
- preselected theme (#8354) (84d2026)
- drizzle: customize schema with before / after init hooks (#8196) (8acbda0)
- add upsert to database interface and adapters (#8397) (82ba193)
- improve afterError hook to accept array of functions, change to object args (#8389) (28ea0c5)
- templates update (#8391) (e72f12a)
🐛 Bug Fixes
- db-mongodb: docs duplicated in list view with drafts (#8435) (adc9bb5)
- richtext-lexical: add max-width to tables (temporary fix for overflow). (#8431) (a09811f)
- ui: autosave and preventLeaveWithoutSaving interfering with fetching form-state reliably (#8434) (c73f6c7)
- ui: number field not being able to clear out the field's value (#8425) (5c2e39e)
- ui: align to the top fields inside row field (#8421) (4b0351f)
- ui: versions in documentInfo and status component reverse latest true changes (#8417) (95231da)
- db-mongodb: add req to migration templates for transactions (#8407) (b10f61c)
- make field property of FieldLabel optional and partial (#8409) (87360f2)
- plugin-seo: titles being displayed twice (#8310) (8fadc33)
- drizzle: migrate args no longer partial payload request (#8375) (c6519ab)
- client function error on forgot password view (#8374) (06ea67a)
- drizzle: use alias for localized field sorting (#8396) (775e6e4)
- lock documents using the
live-preview
view (#8343) (57f93c9) - ui: published, draft and changed labels should now be correctly displayed (#8382) (a37abd1)
- db-vercel-postgres: include needed pg dependency (#8393) (6da4f06)
- templates: proper migration file import source for vercel-postgres (#8394) (50da212)
- safely access user in auth operations (#8381) (a80f5b6)
- db-mongodb: db.find default limit to 0 (#8376) (dc69e2c)
- richtext-lexical: regression in lexical blocks (#8378) (19e2f10)
- richtext-lexical: table dropdown menu dark mode color (#8368) (bd41b4d)
- optional sortOptions type for SingleRelationshipFieldClient (#8340) (fbc395b)
- next: set the user data after first user registration (#8360) (30eb1d5)
- drizzle: sanitize query value uuid / number id NaN (#8369) (dedcff0)
- drizzle: array/relationship/select hasMany in localized field (#8355) (338c93a)
- cannot use join on relationships in unnamed fields (#8359) (c696728)
- ui: inconsistent arrow dropdown on buttons, popover missing caret (#8341) (3583c45)
⚠️ BREAKING CHANGES
-
improve afterError hook to accept array of functions, change to object args (#8389) (28ea0c5)
Changes the
afterError
hook structure, adds tests / more docs.
Ensures that thereq.responseHeaders
property is respected in the
error handler.afterError
now accepts an array of functions instead of a single
function:- afterError: () => {...} + afterError: [() => {...}]
The args are changed to accept an object with the following properties:
Argument Description error
The error that occurred. context
Custom context passed between Hooks. More details. graphqlResult
The GraphQL result object, available if the hook is executed within a GraphQL context. req
The Request object containing the currently authenticated user
collection
The Collection in which this Hook is running against. This will be undefined
if the hook is executed from a non-collection endpoint or GraphQL.result
The formatted error result object, available if the hook is executed from a REST context.