Did the FlatDataDraft Get Removed in the GraphQL?

I have…

  • [ 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

Current behavior

Cannot run graphql commands using flatDataDraft anymore

Expected behavior

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”?”"

Environment

  • [ 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

Browser:

  • [X ] Chrome (desktop)
  • [ ] Chrome (Android)
  • [ ] Chrome (iOS)
  • [ ] Firefox
  • [ ] Safari (desktop)
  • [ ] Safari (iOS)
  • [ ] IE
  • [X ] Edge

Others:

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

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.

Step 1

Create a published content item

You will retrieve this item with the public API.

Step 2

Create a new draft for this item and update it.

You still get the published version.

Step 3

Set X-Unpublished=1 in your request.

You will now retrieve the new draft version that you can use as a preview for your editors.

1 Like

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.

1 Like