Fix HTTP API property namespace in db-version-changes.md - #141
Open
tiensonqin wants to merge 1 commit into
Open
Conversation
Document the actual fallback namespace :plugin.property._test_plugin (and :plugin.class._test_plugin for classes) used when property writes come from the HTTP API or other callers without a plugin id. Fixes logseq/db-test#1051 Co-authored-by: Tienson Qin <tiensonqin@gmail.com>
There was a problem hiding this comment.
Pull request overview
Updates the database version change documentation to accurately reflect the namespace used for HTTP API callers (or callers without a plugin id) when writing properties/classes.
Changes:
- Replace the incorrect
:plugin.property._apinamespace reference with the documented fallback:plugin.property._test_plugin. - Document the analogous class namespace fallback
:plugin.class._test_plugin.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+127
to
128
| * All property related calls like `upsertBlockProperty` work with DB graphs. Property values can now be numbers and booleans. When called through the HTTP API (or any caller without a plugin id), properties are namespaced to `:plugin.property._test_plugin` (and classes to `:plugin.class._test_plugin`). | ||
| * See [this test file](https://github.com/logseq/logseq/blob/master/clj-e2e/test/logseq/e2e/plugins_basic_test.clj) for using the api with DB graphs. No newline at end of file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
db-version-changes.mdincorrectly stated that HTTP API property writes use:plugin.property._api. The shipping implementation in logseq/logseq falls back to_test_pluginwhen there is no plugin id (e.g. HTTP API callers without aPluginLocalcontext).This updates the docs to match actual behavior:
:plugin.property._test_plugin:plugin.class._test_pluginFixes logseq/db-test#1051 (formerly logseq/logseq#13028).
Test plan
_apino longer appears in the docs repoget-sanitized-plugin-idin logseq/logseqsrc/main/logseq/api/block.cljsuses"_test_plugin"as the fallback