Skip to content

Querying for preview via asPreview argument doesn't work when querying by slug, uri idTypes #1673

@benknight

Description

@benknight

According to the switch statement at https://github.com/wp-graphql/wp-graphql/blob/develop/src/Type/Object/RootQuery.php#L503, when querying a post preview via slug or uri, the resolver functions return early before checking the asPreview parameter and returning the revision.

This seems like it would be considered a bug because I would expect the same behavior regardless of which IdType is being used, also because I don't see any documentation that specifically explains why this would be intentional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions