[ X ] Run the existing queries from prior to upgrade
I’m submitting a…
[ X ] Regression (a behavior that stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Documentation issue or request
Cannot run graphql commands using flatDataDraft anymore
I expected to not break my app request when I wanted to preview content. When I query by flatDataDraft I should get the flatDataDraft otherwise if I do flatData I should get the published data.
Minimal reproduction of the problem
Make any simple graphql query using the FlatDataDraft and you will receive the following error message. “Cannot query field “flatDataDraft” on type “”. Did you mean “flatData”?”"
[ X ] Self hosted with docker
[ ] Self hosted with IIS
[ ] Self hosted with other version
[ ] Cloud version
Version: 4.2 and tested in on the cloud version
[X ] Chrome (desktop)
[ ] Chrome (Android)
[ ] Chrome (iOS)
[ ] Firefox
[ ] Safari (desktop)
[ ] Safari (iOS)
[ ] IE
[X ] Edge
Yes, that got removed. It is always data now. Either the latest draft or latest published version.
I have explained it here:
Content Revisions / Versions
To serve both data objects we store them in a single document in the database. This means that the content record in the database is twice as big as it needs to. This adds an unnecessary overhead to the database. Furthermore MongoDB has several limitations around document size and memory usage that can be problematic.
More about this in the following article:
NOTE: After the technical issues it is not up to date, because Squidex only supports 2 versions per content item.
Oh no. This is an issue for us because we use the preview to view content changes before we make it public. This means we can no longer do that. The workflow the documentation highlights makes our code break and exposes changes to the public before it is ready. I guess I will need to roll back and rethink our strategy.
Why is this a problem? You can just use the data version. When you set X-Unpublished=1 you get the unpublished data and you can show that.
It works with content that has not been published, but we were using it for content that has already been published and we are updating.
Perhaps i miss something, but this is how it works. I am demonstrating it with the REST endpoint, because it is faster, but it is the same story with GraphQL.
Create a published content item
You will retrieve this item with the public API.
Create a new draft for this item and update it.
You still get the published version.
X-Unpublished=1 in your request.
You will now retrieve the new draft version that you can use as a preview for your editors.
I see how it works now. I think I misunderstood and did not see the ‘New Draft’ button. This makes sense. Cool great then I think this can work. Thank you for your assistance Sebastian.