How do you get the parent id of a page using GraphQL? #6935
-
|
When I inspect what is available on a page I don't see any information about the parent. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
When working with GraphSQL, it's important to note that it does not automatically return parent page objects. To retrieve these, follow these steps:
By following these steps, you can effectively navigate and retrieve parent page objects in any version of Wiki.Js But note that, depending on case, you will do more requests to server, your client must wait these additional requests. |
Beta Was this translation helpful? Give feedback.
When working with GraphSQL, it's important to note that it does not automatically return parent page objects. To retrieve these, follow these steps:
Identify the Path: Start with a given path. For example, if your path is
a/b/c/d/, the parent path would bea/b.Fetching the Page:
getSingleByPathquery to directly fetch the page at the specified path.pages/search(path)query with your specified path.pages/single(Id)query and pass theIdreturned from the previous step.By following these steps, you can effectively navigate and retrieve parent page objects in any ve…