DatoCMS changelog for new features and general improvements

Content Management API

## [Assign a creator at item creation via API](https://www.datocms.com/product-updates/assign-a-creator-at-item-creation-via-api.md)

[date: 2023-04-28T17:21:14.357+02:00]

Since today it's possible to assign a creator when an item is created via API. The creator can be anyone that belongs to the site or the organization. The call must be made using a token with permission to edit the creator.

API users can assign the creator by declaring the type and the ID of the desired creator in the `relationship` field of the creation request:

```plaintext
POST https://site-api.datocms.com/items HTTP/1.1X-Api-Version: 3Authorization: Bearer YOUR-API-TOKENAccept: application/jsonContent-Type: application/vnd.api+json{  "data": {    "type": "item",    "attributes": { [...] }    },    "meta": { [...] },    "relationships": {      "item_type": {        "data": {          "type": "item_type",          "id": "44"        }      },      "creator": {        "data": {          "type": "account",          "id": "312"        }      }    }  }}
```

New Content Delivery API

## [Introducing explicit AND operators in filter expressions for enhanced convenience](https://www.datocms.com/product-updates/introducing-explicit-and-operators-in-filter-expressions-for-enhanced-convenience.md)

[date: 2023-04-19T08:54:53.239+02:00]

Filter expression conditions have always been implicitly combined using a logical `AND`. However, there are situations where explicitly incorporating an AND expression can greatly improve the filtering experience:

```graphql
query {  allArtists(    filter: {      AND: [        { name: { matches: { pattern: "Blank" } },        { name: { matches: { pattern: "Banshee" } }      ]    }  ) {    id    name    genre  }}
```

In the example provided, the same filter type is required multiple times within the same expression. Without an explicit AND operator, this would not be achievable.

We're excited to announce that alongside the pre-existing OR operator, you can now seamlessly incorporate explicit AND operators into your GraphQL queries for optimal flexibility and customization.

Content Delivery API

## [cssRgb string for color fields now available in CDA](https://www.datocms.com/product-updates/cssrgb-string-for-color-fields-now-available-in-cda.md)

[date: 2023-04-14T00:00:00.389+02:00]

To make integrating with your front-end easier, we decided to have the CDA returning a handy string containing the `rgb()` functional notation of a color field, expressed with [the current standard syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/rgb).

As an example, the following query:

```graphql
{  leaf {    color {      cssRgb    }  }}
```

Returns a string containing three space-separated values, representing respectively values for red, green, and blue. Optionally, it may also include a slash / followed by a fourth value, representing alpha.

```plaintext
{  "data": {    "leaf": {      "color": {        "cssRgb": "rgb(213 185 185 / .43)"      }    }  }}
```

Content Management API UI Improvement Security

## [Multiple-paragraph text field now supports HTML sanitization](https://www.datocms.com/product-updates/multiple-paragraph-text-field-now-support-html-sanitization.md)

[date: 2023-04-13T16:15:24.135+02:00]

We recently introduced the possibility of validating and sanitising HTML content in multiple-paragraph text fields.

(Image content)

A screenshot that shows the feature in the Validations tab of a field editing modal.

The feature is made of 2 parts:

-   By enabling the validation flag "Prevent the use of dangerous HTML attributes", the editors will be prevented from saving a record if potentially dangerous HTML is present in the field;
-   When the "Remove potentially dangerous attributes" flag is enabled, sanitization will be applied before the validation: field content is potentially subject to changes during the validation phase.
    

Most of our customers that want to use the feature will probably want to enable both flags. Validation without sanitization is meant for customers who want to apply specific sanitization strategies by developing a custom plugin.

To fix and check the HTML, we used the beautiful [sanitize library](https://github.com/rgrove/sanitize/) made by Ryan Grove. Specifically, we went for the *relaxed* configuration, that allows safe markup, including images and tables, as well as safe CSS. Links are limited to FTP, HTTP, HTTPS, and `mailto` protocols, while images are limited to HTTP and HTTPS. `rel="nofollow"` is not added to links.

The feature also affects our Content Management API.

New Content Delivery API

## [Image placeholders now support transparency](https://www.datocms.com/product-updates/image-placeholders-now-support-transparency.md)

[date: 2023-04-13T15:00:01.777+02:00]

We're happy to announce that low-quality image placeholders (LQIP) offered by the GraphQL Content Delivery API via the `responsiveImage` and `blurUpThumb` queries, now fully support images with alpha channels!

You can read the [complete announcement](https://www.datocms.com/blog/introducing-thumbhash-the-compact-placeholder-with-alpha-support.md) in our blog post.

Content Delivery API

## [Upcoming changes in GraphQL query complexity limit](https://www.datocms.com/product-updates/upcoming-changes-in-graphql-query-complexity-limit.md)

[date: 2023-04-12T12:41:14.825+02:00]

Our GraphQL service is implementing a new change starting from June 12, 2023. GraphQL requests with a complexity score **above 10,000,000** will return an error message. We have worked hard to develop a new algorithm that calculates the complexity score more precisely. It will help us prevent abuses and ensure that our GraphQL service remains fast and efficient for all customers.

The complexity score is calculated based on the number of fields requested and other factors contributing to the computational resources needed to process the query. You can read more about how we generate this score and where to obtain it on the [updated doc page](https://www.datocms.com/docs/content-delivery-api/complexity.md).

**The maximum complexity score in your plan might be higher than the default**. However, we encourage all customers to review their queries and optimize them to reduce their complexity score where possible. You can see what's your plan limit on your [dashboard page](https://dashboard.datocms.com/).

As you know, our GraphQL server returns the HTTP header `X-Complexity` with the score of the given query. Today we have added a new header named `X-Max-Complexity` that shows your current plan limit. **This pair of headers will help you identify which queries will start to return an error starting from June 12, and thus need a change**.

If you have any questions or concerns about this change, please don't hesitate to contact our support team. We appreciate your understanding and cooperation as we make this important change.

Content Delivery API

## [Improved HEX notation for Color Fields in Content Delivery API](https://www.datocms.com/product-updates/improved-hex-management.md)

[date: 2023-04-11T18:26:06.047+02:00]

We're excited to announce that we're upgrading the management of CSS hex color notation in color fields for the Content Delivery API. Starting today, we'll be using the 8-digits hex color notation, or `#RRGGBBAA`, which includes the alpha channel.

##### Current behavior

Currently, color fields return a CSS hex string that follows the [6 digits hex color notation](https://www.w3.org/TR/css-color-4/#hex-notation). Unfortunately, this notation doesn't include the alpha channel. So when you query a color field, the hex value returned may not accurately represent the color you're looking for. For example, if you query a transparent color field, you may actually get the hex string for the color white.

Here's an example of the current behavior:

```graphql
{  "color": {    "hex": "#FFFFFF",    "alpha": 0,    "blue": 255,    "green": 255,    "red": 255  }}
```

##### Improved behavior

To address this issue, [we're adopting the widely-used 8-digits hex color notation](https://caniuse.com/css-rrggbbaa) in the Content Delivery API. By using this notation, you'll get a more accurate representation of the color you're querying, including the alpha channel.

Here's an example of the improved behavior:

```graphql
{  "color": {    "hex": "#FFFFFF00",    "alpha": 0,    "blue": 255,    "green": 255,    "red": 255  }}
```

##### Who is affected by this change?

This change will apply to all brand new DatoCMS projects created from today onwards. If you have an existing project that you'd like to update, you can manually do so in the Environment Settings:

(Image content)

Please note that this change cannot be undone, so **we strongly recommend testing the effects in a sandbox environment** before applying the change to your primary environment.

We hope this change will improve your experience when working with color fields in the Content Delivery API. As always, if you have any questions or concerns, please don't hesitate to reach out to our support team.

New Performance optimization UI Improvement

## [Introducing Fast Fork: a faster way to copy large environments](https://www.datocms.com/product-updates/introducing-fast-fork-a-faster-way-to-copy-large-environments.md)

[date: 2023-04-05T12:03:42.216+02:00]

We're excited to announce our latest feature: Fast Fork. For users working with large environments, forking an environment can be a time-consuming process. Fast Fork offers a solution that can be **up to 20 times faster than a regular fork**. The only downside is that during the fork process, the source environment will be kept in read-only mode, which means that other users won't be able to make any changes to its content — this is similar to turning on [Maintenance Mode](https://www.datocms.com/docs/scripting-migrations/apply-migrations-to-primary-environment.md#step-1-turn-on-maintenance-mode-to-prevent-changes-to-the-primary-environment).

Using Fast Fork on the DatoCMS interface is easy. Simply select the "Fast Fork" option when creating a fork. If a user is currently making changes to a record in the source environment, they will be warned and asked if they want to proceed anyway. This gives users the option to coordinate with other team members and avoid conflicts:

(Video content)

For users who prefer to use the CLI, the `migrations:run` and `environments:fork` commands support an additional flag for the fast fork option. However, unlike the interface, if a user is currently making changes to a record, the CLI will stop the operation. To proceed in any case, the user has to explicitely pass the `--force` option.

We hope that this new feature will help our users save time and increase efficiency when working with large environments. Check out our [documentation page](https://www.datocms.com/docs/scripting-migrations/scripting-migrations-with-the-datocms-cli.md#using-fast-fork-option-for-large-environments) for all the details on Fast Fork and how to use it. Happy forking!

Content Delivery API

## [Deprecating the "exists" filter for string, text, and Structured Text fields](https://www.datocms.com/product-updates/deprecating-the-exists-filter-for-string-text-and-structured-text.md)

[date: 2023-03-01T11:40:07.159+01:00]

On fields of type Single-line string, Multi-paragraph text, and Structured Text, we used to allow both `null` value and empty strings (`""`), but in both cases the API would return an empty string.

The `exists` filter, which selects values different from `null`, would then return empty strings instead of `null` values. This behavior is confusing and unpredictable, so we decided to deprecate the `exists` filter for these types of field.

We created a new filter, called `isPresent`, that selects values that are neither `null` nor empty strings. It behaves as the opposite of `isBlank`. The `exists` filter will continue to work, but is now deprecated, and will be removed in future versions of our API.

New Security

## [Introducing Organizations for easier collaboration!](https://www.datocms.com/product-updates/introducing-organizations.md)

[date: 2023-02-09T12:58:17.392+01:00]

Today we are thrilled to announce the launch of Organizations: a powerful new feature that makes it easier — and more secure — to **share ownership of projects with other team members!**

Please read the [complete announcement](https://www.datocms.com/blog/introducing-organizations.md) in our blog!