Ability to filter valid/invalid records
A small addition in the records collection index: you can now filter records by their valid/invalid state!
A small addition in the records collection index: you can now filter records by their valid/invalid state!
To ensure that complex composition of Imgix params resolve correctly even when nested several levels deep, the Content Delivery API now automatically generates Imgix URLs using the base64 variant when needed.
As an example, the following query:
{ author { avatar { url(imgixParams: {txt: "Hello world"}) } }}
Now returns an URL using the txt64
variant of the same transformation, as suggested by Imgix:
https://www.datocms-assets.com/205/1636982597-image.jpg?txt64=SGVsbG8gd29ybGQ
To make some room for future improvements to the GraphQL CDA, we're changing the way you can request content coming from sandbox environments and access records in draft.
The following GraphQL endpoints are now deprecated:
http://graphql.datocms.com/previewhttp://graphql.datocms.com/environments/:environment_namehttp://graphql.datocms.com/environments/:environment_name/preview
In favor of these new headers:
X-Environment
: to explicitly read data from a specific environment;
X-Include-Drafts
: to access records at their latest version available, instead of the currently published one.
Please note that these deprecated GraphQL endpoints will continue to work indefinitely, but we strongly suggest to only use http://graphql.datocms.com/
as the GraphQL endpoint from now on. The documentation has been updated accordingly to reflect this change.
Up until now, if you did not provide an X-Api-Version
header in your request towards the Content Management API, legacy API version 1 was used.
To avoid ambiguity and possible unexpected problems, we have decided to change this behavior on projects created from this point on:
if your project was created before 31 May 2022, 13:00:00: not explicitly passing the X-Api-Version
header will default to CMA API version 1 — nothing changes;
if your project is created after 31 May 2022, 13:00:00: not explicitly passing the X-Api-Version
header will result in an error and a 422 Unprocessable Entity
status code.
Starting from May 30th, 2022 10:00 CEST:
The site
resource object returned by the CMA will no longer expose the following properties:
attributes.frontend_url
: this was deprecated years ago in favor of multiple build triggers per project;
relationships.menu_items
: use the dedicated endpoint to retrieve the list of menu items;
relationships.users
: use the dedicated endpoint to retrieve the list of collaborators;
relationships.sso_users
: use the dedicated endpoint to retrieve the list of SSO users;
relationships.roles
: use the dedicated endpoint to retrieve the list of roles;
relationships.build_triggers
: use the dedicated endpoint to retrieve the list of build triggers.
Today we're switching to a better management of timezones in datetime values stored in your projects!
DateTime fields in your records do not carry timezone information.
If you use the Content Management API to create/update a record, and you provide an ISO8601 datetime complete with timezone to a DateTime field, the timezone part is completely ignored by the system. Just the date + time information will be stored in the field value, and the project timezone will be automatically applied to it when the API outputs the value.
const record = await client.items.update('324342', { dateTimeField: '2000-01-01T09:30+10:00',});
console.log(record.dateTimeField);
In this example, if the timezone setting in your project is Europe/Rome
, the returned datetime won't be 2000-01-01T09:30+10:00
, but 2000-01-01T09:30+01:00
.
Also, if you change the timezone setting in the future to be ie. Pacific Time
, the same date will immediately become 2000-01-01T09:30-08:00
, and every other date stored in your records' fields will change similarly. This basically has the effect of moving dates in time.
DateTime fields in your records DO carry timezone information with them.
The only effect of the global timezone setting is to return via API every datetime value coherently converted in the same timezone.
Following the same example used above, if the timezone setting in your project is Europe/Rome
, and you update a datetime field value passing 2000-01-01T09:30+11:00
, the datetime returned by the API will be 1999-12-31T23:30+01:00
— that is, same point-in-time, but expressed in the project timezone.
If you change the timezone setting in the future to be ie. Pacific Time
, the same date will immediately be presented via API in the new timezone (1999-12-31T14:30-08:00
), but the point-in-time will be kept intact.
Every brand new DatoCMS project created starting from today will be under the improved behavior. If you want to switch your existing project to the new behavior, you can manually do so in the Environment Settings:
PS: Be aware that the change cannot be undone, so be sure to test the effects in a sandbox environment before applying the change to your primary environment!
Sometimes the invitation email to participate in a project can get lost. In these cases, you can now send a new invitation email from the Collaborators section:
A new modal is now displayed when adding a new locale on a record, to ask if you want to copy the content present in the main language:
A welcome addition to speed up the editing of records:
Cmd/Ctrl + S
saves the record
Cmd/Ctrl + Shift + S
publishes the record
If you have other shortcuts to suggest, we're all ears!
We're happy to announce that we've completely rewritten the datetime component to make entering dates more intuitive, especially for teams that are in different timezones.
The first thing you'll notice is the timezone information, which is now always visible next to the date itself:
For added convenience, each user will always see dates converted into their system timezone, regardless of the project timezone setting.
You can always change your default timezone preference in the localization settings:
Another welcome change (we hope) is time shortcuts — ie. just type 15<Tab>
and the system will interpret it as 15:00:00
. We also got rid of the time selector dropdown, as it was rather annoying to work with: