Skip to content

[Serious] Graphql api draft option not working for unpublished documents #1566

@Stupidism

Description

@Stupidism

Bug Report

I found our draft articles and unpublished articles are shown in prod env.

Steps to Reproduce

  1. Open pages list in demo site and publish the first article
  2. Publish the second article and then unpublish it directly

image

  1. Open the graphql-playground:
    https://demo.payloadcms.com/api/graphql-playground

Input this query and execute:

# Write your query or mutation here
query getPages {
  Pages(draft: false) {
    docs {
      slug
      _status
      updatedAt
    }
  }
}

image

Other Details

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions