webiny / webiny-js

Open-source serverless enterprise CMS. Includes a headless CMS, page builder, form builder, and file manager. Easy to customize and expand. Deploys to AWS.
https://www.webiny.com
Other
7.22k stars 588 forks source link

Headless CMS / Deprecated `ownedBy` / `publishedOn` Fields - Ensure Existing Old Values Are Returned #4161

Closed adrians5j closed 3 weeks ago

adrians5j commented 4 weeks ago

Changes

This PR fixes an issue that was present with the resurrected ownedBy and publishedOn GraphQL fields (now marked as deprecated).

Prior to this PR, despite the fact that the data existed in the database, the values for these fields would always end up being null:

image

With this PR, this is no longer the case. The fields will always contain the correct value (the value that's actually recorded in the database).

Additional Changes

We've also tested the ability to add a custom GraphQL field resolver for these fields, in case a user wants to return fallback values in a different way.

How Has This Been Tested?

Manual, added two Jest tests.

Documentation

Changelog.