Now since content delivery API returns draft/archived content in such way that it partially includes draft content we need to start validating the model on service side.
What would be the recommended ways to handle this? Maybe you can provide a flag/header that would indicate whether this content is partially published?
and not like the 2nd item in the array, it means the referenced entry is not published. That’s the easiest way to see if content is completely published or not.
I have the same issue but with a single reference and feel like there should be some way to query this instead of having to client-side validate if the reference is published or not.
In my example I have an “Article”-content type which you pick a “Article > Category”-entry for.
But I this query don’t work:
‘fields.category.fields[exists]=true’, because I guess the fields do “exist” server-side why that query don’t work.
And I weirdly cant write a rather hacky query like:
‘fields.category.sys.revision[gt]=1’, either because that gives me the error: “The path “fields.category.en-US.sys.revision” is not recognized”
I cant make the Category-field required for the article either because the client want to be able to pick “no category” as well.
where 13tMd7Kv0yW4m0Ogmio2k4 is the entry ID of the category.
As long as Category is a single reference, you can query for articles which have a published category (excluding articles with a draft category or no link category) like this: