Skip to content

Instantly share code, notes, and snippets.

@Zmetser
Created February 16, 2024 16:09
Show Gist options
  • Save Zmetser/eb74e775ef12436a39e4a0402570f157 to your computer and use it in GitHub Desktop.
Save Zmetser/eb74e775ef12436a39e4a0402570f157 to your computer and use it in GitHub Desktop.
Example query we're planning to do for the new Everything Page
query TheScreen {
theScreen(nodeId: String) { # this is the junction block id or the root thread id
# this is the junction block
# NULL if the thread is a root thread
related_to_block {
uuid
created_by {}
content
}
threads [ # Technically not threads, but using these we will create something that looks like a thread on the client
{
# this is a flattened structure of all the conversation Blocks up until someone commented twice, if any
# aka Back and forth without ownership
back_and_forth {
uuid
created_by {}
content
}
# This is the thread, if any
# Can be a Public Side Thread, or a Private, already owned discussion
thread { # Will be referenced as CLAIMED THREAD
uuid
created_by {}
role
block_range {
uuid
content
created_by {}
related_threads {
# This is a new property
has_more # Boolean; Does the flattened thread from this level has more than just one comment?
summary_block {
uuid
created_by {}
content
}
}
}
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment