Querying scheduled content using GraphQL API

When I create a model and add several items to it. For one item I setup scheduling and I see it working in the model table, where state column reflects current state of the page either “scheduled”, “published” or “expired”.

But when I query same collection using GraphQL API, I always receive scheduled item whatever it’s state. Querying published field always returns “published” value, even when state is “scheduled” or “expired”, so I can’t do the query based on it.

Here’s are some examples:


query Query {
    data {

Part of the result:
Screen Shot 2022-07-04 at 10.17.10

As a solution I can always add a $gte and $lte to the query on start and end end date. But having state variable available that would correctly reflect scheduling state would be much more reliable and useful.

Hi @alex.krasikau,

Thanks for using our builder.io forum.

We appreciate your suggestion. Making scheduling state available in state variable could be very useful, so we are raising a ticket to get this feature available as soon as possible. We will try to keep you posted when we have any insight from our engineering team.

Thank you!