Fetch draft version of referenced entity when latest(draft) url of node is queried

Created on 14 December 2023, about 1 year ago
Updated 25 January 2024, 11 months ago

Problem/Motivation

For a node having moderation workflow with draft and published states and entity reference field for a revisionable entity( bricks in this case), below graphql query for latest draft revision of node

query getNodeData {
  route(path: "/node/1/latest") {
    ... on DefaultEntityUrl {
      entity {
        label
        ... on NodeAggregation {
          moderationState
          fieldBricksRawField {
            list {
              entity {
                label
                moderationState
              }
            }
          }
        }
      }
    }
  }
}

returns draft version of simple node fields but published version of the referenced bricks

{
  "data": {
    "route": {
      "entity": {
        "label": "node title DRAFT",
        "moderationState": "draft",
        "fieldBricksRawField": {
          "list": [
            {
              "entity": {
                "label": "Brick title Published",
                "moderationState": "published"
              }
            }
          ]
        }
      }
    }
  }
}

Is there a possibility to get draft version of the nested items when querying for draft version of node.

💬 Support request
Status

Closed: works as designed

Version

1.0

Component

Code

Created by

🇮🇳India sumit_saini

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024