Do custom Graphql DQL queries work with `@recurse` directive?

You may go as much deep as you want in GraphQL.

Even if you use customDQL, the number of levels deep the query results are, depends on what you have queried.

query MyQuery {
  queryChildrenByNode(title: "today") {
    nodeId
    title
    children {
      nodeId
    }
  }
}

will show results upto one level.

query MyQuery {
  queryChildrenByNode(title: "today") {
    nodeId
    title
    children {
      nodeId
      title
      children {
        nodeId
        title
      }
    }
  }
}

will show values for 2 levels and so on.

Just because @recurse custom DQL query is used, it does not mean that data at all levels would be shown.

1 Like