Home

>

Tools

>

Payload CMS

>

Releases

>

Release 0.19.0

Payload CMS Release: Release 0.19.0

Tag Name: v0.19.0

Release Date: 7/8/2022

Payload CMS LogoPayload CMS

Payload CMS is a modern, self-hosted headless content management system built with TypeScript, Node.js, and MongoDB. It's designed specifically for developers who want full control over their content management system while maintaining a powerful admin interface for content editors.

TL;DR

Payload CMS v0.19.0 brings several important enhancements to GraphQL capabilities, relationship field handling, and file operations. Key improvements include the ability to generate GraphQL schema, better relationship field access control, and the option to clear DatePicker values. This release also fixes critical issues with array data persistence and authentication relationships in GraphQL queries.

Highlight of the Release

    • New GraphQL schema generation capability for better API documentation and integration
    • Improved relationship field handling with proper access control
    • Added ability to clear DatePicker values
    • Fixed critical issues with array data persistence
    • Enhanced file operations with direct File argument support in create/update operations

Migration Guide

No breaking changes were identified that would require migration steps. This release should be compatible with applications running on v0.18.5.

If you're using relationship fields with custom access control, you may notice improved behavior where IDs can now be read from relationships regardless of access permissions on the related document.

For developers using GraphQL, the new schema generation feature can be used by running:

payload generate:graphQLSchema

This will output your GraphQL schema for documentation or integration purposes.

Upgrade Recommendations

This release is recommended for all Payload CMS users, especially those who:

  1. Use GraphQL for API interactions
  2. Work with relationship fields and complex access control
  3. Need to clear DatePicker values
  4. Experience issues with array data persistence
  5. Work in cross-platform development environments

The upgrade should be straightforward with no breaking changes reported. Update your dependency version to v0.19.0 in your package.json and run your package manager's install command.

Bug Fixes

Relationship Field Access Control

Fixed an issue where relationship fields were incorrectly affected by access control in related collections. The fix ensures that IDs can be read from relationships regardless of access permissions on the related document.

Array Data Persistence

Resolved a bug where old data from arrays was being incorrectly persisted when updating documents, leading to unexpected data in array fields.

Cross-Platform File Operations

Fixed the copyfiles functionality to work properly across different operating systems, improving cross-platform development experience.

GraphQL Auth/Me Relations

Fixed an issue where relationships in the auth/me GraphQL endpoint couldn't be properly queried, ensuring that authenticated users can access their related data.

Mongoose autoIndex Option

Fixed support for passing the autoIndex option in mongoose connectionOptions, giving developers more control over database indexing behavior.

New Features

GraphQL Schema Generation

Payload now includes a new feature to generate GraphQL schema files. This allows developers to output the schema for documentation or integration purposes. The script commands are case insensitive for better developer experience.

File Arguments in Create/Update Operations

You can now pass File arguments directly in create and update operations, making it easier to handle file uploads programmatically without needing separate steps.

DatePicker Clearing

The DatePicker component now allows clearing selected values. Previously, once a date was selected, users couldn't remove it without selecting another date.

Security Updates

No specific security fixes were mentioned in this release.

Performance Improvements

Mongoose Connection Options

The fix for autoIndex mongoose connectionOptions can lead to performance improvements in database operations, especially for large collections, by giving developers more control over when and how indexes are built.

GraphQL Query Optimization

The improvements to relationship handling in GraphQL queries, particularly for the auth/me endpoint, should result in more efficient queries with fewer potential errors.

Impact Summary

Payload CMS v0.19.0 delivers significant improvements to GraphQL capabilities, relationship field handling, and file operations. The new GraphQL schema generation feature will be particularly valuable for API documentation and integration workflows.

The fixes for relationship field access control and array data persistence address important pain points that could cause unexpected behavior in previous versions. Content editors will appreciate the ability to clear DatePicker values, while developers will benefit from improved cross-platform compatibility and more flexible file handling options.

Overall, this release enhances both developer experience and end-user functionality without introducing breaking changes, making it a recommended upgrade for all Payload CMS users.

Full Release Notes

0.19.0 (2022-07-08)

Bug Fixes

  • allow passing of autoIndex mongoose connectionOptions (#722) (567d8c1)
  • copyfiles cross platform (#712) (67331eb)
  • ensures auth/me relations in gql can be queried (01bc1fe)
  • ensures old data from arrays is not persisted (d9ef803)
  • relationship field disabled from access control in related collections (#644) (91e33d1)

Features

Statistics:

File Changed39
Line Additions545
Line Deletions121
Line Changes666
Total Commits18

User Affected:

  • Can now generate GraphQL schema with new script commands
  • Benefit from improved cross-platform compatibility for file operations
  • Can pass autoIndex mongoose connectionOptions for better database control
  • Can now include File arguments directly in create/update operations

Contributors:

mjombleakanshSirohiDanRibbensklapecjmikrutchris-schrahenrituan