Nested Graphs (A Graph within a Graph)

Hey,

I’m doing something crazy with nested graphs, which works great for me so far, but I’d love to know if there could be potential conflicts on doing this?


What I’m doing

I have a Logseq graph inside my existing graph, let’s call this a “Nested Graph”

Why I do this

I do this so that I can easily filter out my private notes, from the ones I intent to make public with “Logseq public pages”

Since I’m also planning more YouTube videos for Logseq. This is a great way for me to filter all my private notes.

This is the folder structure I have


So far this works great, the only conflict I have is when I switch from MY NESTED NOTES 1.1 to MY NOTES 1 I need to Re-Index Graph, other wise Logseq seems to confuse the daily page from one graph to another.


Would love to know if anyone else is doing this, or sees any potential issues.

Of course I’d love to know @tienson and the Logseq team, can see any potential issues with doing this in relationship to the refactoring and future of Logseq’s development.

Thanks!!

1 Like

pasting a discord post about my experience with nested graphs (some infos may be obsolete, I stopped using nested logseq graphs, I’d rather wait for linked graphs) :

cannibalox 03/18/2021

@Logseq Team I’m testing nested graphs, to see if it’s possible to isolate a private work folder from a general purpose repo while keeping a one-way connection (graph_master is pointing to /repo and graph_nested is point to /repo/nested). it could work but some initial findings :

  • settings seem to be working (different settings per graph)
  • issues with Those pages have the same title, you might want to only keep one file. for journals and >contents page (eg. contents.md and /nested/contents.org) and more generally if files have the >same name in both graphs.

we had a brief convo about nested graphs a while ago, after testing, it seems it’s not ready for general >consumption. In theory, it could be useful, but maybe the ability to link graphs would be more efficient >than nesting graphs at this point.

I guess that one workaround would be to disable journals graphs and somehow avoid using contents.md in sub graphs, only in the master graph. However you would still have to ensure that files have unique names.

still I’m curious to read about your findings.

1 Like

Awesome to see you also saw vaule in this. Thanks for your insights.

Yes after testing further today I did find that the nested graph causes conflicts with daily journals.

Thankfully my nested graph doesn’t need to have journals, so I disabled that.

I did find conflicts with contents.md I renamed the nested graph contents to sidebar.md and added this.


I do agree that it’s not something well suited for beginners since one needs to solve quite a few conflicts, which can be particularly frustrating for beginners.

I hear about the plan of linked graphs in the zoom call, however I don’t fully understand it. Do you think it would be a good alternative for nested graphs, specially with my current use case?

Thanks!!

in my use case, I want to have one encrypted graph, and one (possibly nested) unecrypted graph and be able to reference pages from one to another? is that a pipe dream?

2 Likes

That’s a good idea. The interconnection between graphs and nested graphs would be extremely useful.

I think the Logseq team has something in mind regarding interconnected graphs. Maybe in the future that will solve our problems.

2 Likes

Hello @santi, @cannibalox, and community,

I am wondering if 3 years later we have a solution for this idea.

I would like to create something similar and wonder if I can achieve this in logseq:

  • dedicated graph for each individual project I work on (shared graphs - different git repos)
  • the personal graph that glous everything together in the parent folder (where basically I would like to collect all TODOS from all projects and add my own personal notes not shared with anybody).

In Obsidian I think git submodules would fix my issue. https://www.reddit.com/r/ObsidianMD/comments/n7adun/working_with_multiple_repos/

1 Like