Make a Query Playground (Logseq sample plugin) a first class citizen - debugger/viewer/analyzer for am advanced queries

This sample plugin is so amazing, I would really like to have it available in standard installation:

It was not entirely obvious to me where to find this plugin, it’s not featured in the “Getting Started” list of the sample plugins, but here is a reference. (First thing I found on the net was markbastian/datascript-playground library.)


Just to confirm, to run this plugin you need a full dev environment is that correct?

I do not have a dev setup for Logseq, just a users install, and I cannot get this plugin to work, I am sure node.js needs to be installed.

Is that the case, or does this plugin for without Node.js? Maybe I am making a mistake when trying to install it.

In response to your feature request, I am 100% for the idea of this being a first class citizen and built into the core of Logseq, that is an awesome idea.


Thanks @jonor for adding the reference, I totally forgot to add the url to the repo!

It seems you are right about dev env, @drawingthesun. Hence this FR :slight_smile:

I will try to install it myself, we will see. @Jeddychan on Discord shared npm setup tutorial: Setting Up Windows for JavaScript Development THE RIGHT WAY (WSL Terminal NVM Node Yarn VS Code ZSH) - YouTube

1 Like

I can definitely see value in making the Query Playground, along with “(dev) show block data” more accessible. Currently both of those are effectively locked behind dev-level hurdles (being able to build plugins, and having the developer options turned on).

I definitely see this kind of power-user type stuff sitting somewhere in-between typical users, and developers, so removing the dev-type barriers to entry would be beneficial.

1 Like

Does it work with Logseq 0.6.3?
I have enabled the plugin but I can’t find a way to access it in the UI.

I can load the plugin and it shows up under Settings: Plugins, but how do I know whether the plugin is functional? It does not seem to make any difference whether the project is installed and built or not.
The yarn.lock file contains references to, which someone mentions here Logseq plugin samples for beginner 🌱 | CssRepo

1 Like

Yeah, it seems it doesn’t mount properly. We were debugging it on discord a bit.

Hit CTRL SHIFT I, review the error when you try to launch the script.

If you would review the line giving an error, it was some initialization. We were able to modify it a bit and got it spawned, but the editor itself was broken either way…

Ok, thank you. I can see that the error message refers to some element which is not available anymore. Probably that is why the icon does not show up where it appears in the screen recording.

logseq-query-playground can not resolve selector target #search (anonymous) @ instrument.js:188

I understand that the sample plugins are proof of concepts for study and demonstration of the mechanisms, and not intended for real use. Also the Query Playground plugin is not included in the recommended list of sample plugins to start with, which might be a hint of caution for beginners.

It could be helpful to know which version of Logseq a plugin was written for.

If there is a dependencies section in the package.json, the version of @logseq/libs could perhaps say something about breaking changes. Since the plugin mechanism is in alpha state it might be expected that each new version of the platform may very well break plugins written for the previous version.

Dependencies for logseq-query-playground

 "dependencies": {
    "@logseq/libs": "^0.0.1-alpha.20",
    "ace": "^1.3.0",
    "lodash.debounce": "^4.0.8",
    "svelte-ace": "^1.0.21"

Compared with dependencies for the logseq-journals-calendar plugin which is in the curated “getting started” list.

  "dependencies": {
    "@popperjs/core": "^2.9.1",
    "@logseq/libs": "^0.0.1-alpha.26",
    "dayjs": "^1.10.4",
    "v-calendar": "^3.0.0-alpha.3",
    "vue": "^3.0.4"