Skip to content

Relationships in globals do not cascade the draft paramater in GraphQL #6642

Closed

Description

@evelynhathaway

Link to reproduction

evelynhathaway@9bd24ff

Describe the Bug

GraphQL specifically doesn't seem to cascade the draft argument to relationships for specifically queries to a global. When I tested with the REST API on globals and when I use GraphQL to query documents from a collection, it cascades correctly.

Related to #4985, #6141

To Reproduce

  1. Use the linked reproduction
  2. Open http://127.0.0.1:3000/api/graphql-playground
  3. Query the Menu global with the draft parameter:
{
  Menu(draft: true) {
    relationship {
      text
    }
  }
}
  1. Note that the returned value of the relationship is the published version, unlike if the draft parameter was manually applied to the relationship, which correctly returns the draft:
{
  Menu(draft: true) {
    relationship(draft: true) {
      text
    }
  }
}

Payload Version

v2.16.1

Adapters and Plugins

No response

Activity

  1. added
    status: needs-triage
    on Jun 5, 2024
  2. removed
    status: needs-triage
    on Jun 5, 2024
  3. github-actions commented on Sep 7, 2024

    @github-actions
    Contributor

    This issue has been automatically locked.
    Please open a new issue if this issue persists with any additional detail.

  4. locked as resolved and limited conversation to collaborators on Sep 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions