Contentful logo

Contentful Community

GraphQL API and published/draft status

I am working on a Gatsby site, and trying to introduce what I thought would be a fairly basic filter. It currently looks something like this…

      filter: {
        sys: {
          revision: {
            ne: null
    )  {
      edges {
        node {
          title {

What I really want that filter to look for is Draft content. This statement filters correctly if a post has never been published, but if it is published and returned to Draft, revisions is no longer null.

I’m kind of getting the impression that the answer is “no you can’t do this,” so I’m mostly interested in why. This seems like very basic functionality. Or am I totally dumb and missing something?

Sorry I can’t give you the answer but we also really want to see this functionality. In addition to this we want to get validation errors for all changed/drafted entities.