-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API Returns Only IDs for Existing Nodes Under Root Level #3
Comments
Hi @sushmashetty305, Thank you for this issue. I have tried to run the exact code you posted on my Workflowy instance and I got this result:
Which is the expected output. When I deleted the name of an item through the Workflowy app, I got Could you please double check that the items you are trying to display are in fact not empty? If not, are the items somehow special? For example - shared items, mirrors, references, containing formatted text, etc. If you could share some examples of the actual items that are missing, it would be great. Especially the shared items could be a problem. The Workflowy client (this package) includes thorough validation of the actual Workflowy API located at workflowy.com, so any data that is received is properly validated, and if there were some lists with parts of data missing (e.g. missing name), there would be errors. There is a way to check if Workflowy.com returns expected raw data - if the list of items returned were incomplete for some reason, it might manifest as the issue you described. To check for this, please run this command: const client = workflowy.getClient();
const treeData = await client.getTreeData(); // This is the actual `workflowy.com/get_tree_data` endpoint response
console.log(treeData.items); // The `items` should include all the items in the Workflowy document
console.log(treeData.items.length); // How many items were returned When you run the command, you can check how many items were returned. If the number is round, that could raise some suspicion that there might be some pagination going on. I have never encountered that though. Finally, I would like to stress one thing - when using the client, the workflowy.com data is loaded only once, and then the data is stored in memory (until the |
I have done some more testing with shared nodes and I have come to the conclusion that that is what's causing the issue here - my guess is that those In order to support the shared nodes, some non trivial changes need to be made. I'll run some more experiments and will try to see what needs to get improved exactly. |
(responding of behald of @sushmashetty305 ) So we are a bit stuck :-) . It seems that the current module implementation is for single-user uses of workflowy. |
@ogt @sushmashetty305 I was able to quickly implement (partial) support for shared lists / documents, which could be sufficient for your use case. Could you please try it out with the newest version? https://www.npmjs.com/package/workflowy/v/2.5.0 What works: reading of shared lists, even transitively shared (e.g. shared list shared by email directly contains another shared list shared by URL). Modification / making changes to the content of shared lists should work as well, provided that the user has full privileges. What probably doesn't work - trying to re-share a shared list, moving the shared list root node around, traversing from the shared list content via parent relationship to the main list. More testing needed in these areas. |
@karelklima Thank you for the upgrade! 👍 |
Description:
Nodes created via the API return full details and work as expected. However, for existing nodes (not created via the API), only their IDs are returned under the root level.
Steps to Reproduce:
Access nodes created via the API – returns complete details.
Access existing nodes (created elsewhere) – only IDs are returned.
Expected Behavior: API should return full details (e.g., title, structure) for all nodes under the root, regardless of creation source.
Example:
Use the following code to fetch and export a node's structure:
Expected Behavior: The code should retrieve and export the full hierarchical structure, including titles and other details, for all nodes.
Observed Behavior: For nodes created outside the API, only their IDs are retrieved, and their details (e.g., list.name) are missing.
Example Output:
Request: Please investigate why the API only returns IDs for existing nodes and ensure it retrieves full details for all nodes, regardless of their creation source.
The text was updated successfully, but these errors were encountered: