How to get only draft content on Strapi

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

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

Or via RestAPI

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