@payloadcms/db-mongodb
Advanced tools
Changelog
Changelog
1.4.0 (2022-12-23)
${collection.labels.singular} API-Key ${apiKey}
, updated: ${collection.slug} API-Key ${apiKey}
Changelog
@payloadcms/richtext-slate 1.3.1 (2023-12-07)
Changelog
1.3.0 (2022-12-09)
#1547, global afterChange hook not falling back to original global if nothing returned (a72123d)
#1632 graphQL non-nullable relationship and upload fields (#1633) (eff3f18)
change edit key to prevent richtext editor from crashing (#1616) (471d214)
filterOptions function argument relationTo is an array (#1627) (11b1c0e)
resets slate state when initialValue changes, fixes #1600, #1546 (9558a22)
sanitizes global find query params (512bc1e)
unflattens fields in filterOptions callback (acff46b)
feat!: no longer sanitize collection slugs to kebab case (#1607) (ba2f2d6), closes #1607
If you only use kebab case or single word slugs: no action needed.
If you have existing slugs with camel case and populated data: you'll need to convert these to the kebab case version to match the previously sanitized value.
ie. myOldSlug is your slug, you should convert it to my-old-slug.
Any future slugs after updating will be used as-is.
Changelog
1.2.0 (2022-11-18)
You might need to update your config. This change affects collections
, globals
and block fields
with custom labeling.
Collections: are affected if you have a custom labels.singular
defined that differs from your collection slug.
// ExampleCollection.ts
// Before
const ExampleCollection: CollectionConfig = {
slug: 'case-studies',
labels: {
// Before Payload used `labels.singular` to generate types/graphQL schema
singular: 'Project',
plural: 'Projects',
},
}
// After
const ExampleCollection: CollectionConfig = {
// Now Payload uses `slug` to generate types/graphQL schema
slug: 'case-studies',
labels: {
singular: 'Project',
plural: 'Projects',
},
// To override the usage of slug in graphQL schema generation
graphQL: {
singularName: 'Project',
pluralName: 'Projects',
},
// To override the usage of slug in type file generation
typescript: {
interface: 'Project',
},
}
Globals: are affected if you have a label
defined that differs from your global slug.
// ExampleGlobal.ts
// Before
const ExampleGlobal: GlobalConfig = {
slug: 'footer',
// Before Payload used `label` to generate types/graphQL schema
label: 'Page Footer',
}
// After
const ExampleGlobal: GlobalConfig = {
// Now Payload uses `slug` to generate types/graphQL schema
slug: 'footer',
label: 'Page Footer',
// To override the usage of slug in graphQL schema generation
graphQL: {
name: 'PageFooter',
},
// To override the usage of slug in type file generation
typescript: {
interface: 'PageFooter',
},
}
Block Fields: are affected if you have a label
defined that differs from your block slug.
// ExampleBlock.ts
// Before
const ExampleBlock: Block = {
slug: 'content',
// Before Payload used `label` to generate graphQL schema
label: 'Content Block',
}
// After
const ExampleBlock: Block = {
// Now Payload uses `slug` to generate graphQL schema
slug: 'content',
label: 'Content Block',
// To override the usage of slug in graphQL schema generation
graphQL: {
singularName: 'ContentBlock',
},
}
```
**Breaking changes recap**:
On Collections
graphQL.singularName
, graphQL.pluralName
for GraphQL schema names.typescript.interface
for typescript generation name.On Globals
graphQL.name
for GraphQL Schema name.typescript.interface
for typescript generation name.On Blocks (within Block fields)
graphQL.singularName
for graphQL schema names.Changelog
1.1.0 (2022-09-13)