How to get only draft content on Strapi

This article was published on May 04, 2021, and takes less than a minute to read.

Copied
query Tils {
  tils(where: { _publicationState: "preview", published_at_null: true }) {
    id
  }
}

Or via RestAPI

Copied
http://localhost:1337/tils?_publicationState=preview&published_at_null=true