Skip to content

feat: Explain view with the engine's execution plan and the SPARQL algebra - #237

Open
MathiasVDA wants to merge 3 commits into
mainfrom
claude/project-thread-j4ky5q
Open

MathiasVDA wants to merge 3 commits into
mainfrom
claude/project-thread-j4ky5q

Conversation

@MathiasVDA

@MathiasVDA MathiasVDA commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

Requested by Mathias · project thread

Before: MatGUI shows the results of a query but nothing about how the endpoint executed it. A result plugin could run a background query through yasr.executeQuery with a custom Accept header only; one that needs an extra request parameter (Blazegraph and Neptune explain with explain=details) or another path on the same server (Stardog's /{db}/explain) had to send the request itself, without the authentication and request settings of the tab.

After: an Explain tab in the results, from @matdata/yasgui-explain-plugin 1.0.0, shows the execution plan of QLever, GraphDB, Stardog, Blazegraph and Neptune endpoints and the SPARQL algebra of any query. yasr.executeQuery(query, { extraArgs, endpoint }) passes those on to yasqe, which sends the request with the tab's method, headers, authentication and graph arguments. yasr.hostApi is version 2 and carries queryRequest: true, so plugins can feature-detect it. The user guide gets an "Explain Plugin" section and the developer guide documents the option.

How: ExecuteQueryOptions in yasqe gains extraArgs (appended after the configured arguments, never replacing query or update) and customEndpoint (replaces the URL of the populated request config); the Tab maps the yasr options onto them. The plugin is registered like the chart plugin in packages/yasgui/src/index.ts and added at the end of the default pluginOrder.

Closes #147.


Generated by Claude Code

…ueries

Host API 2: `yasr.executeQuery` now honours `extraArgs` and `endpoint`,
so a result plugin can ask an engine for its execution plan (Blazegraph
and Neptune need an `explain` parameter, Stardog its `/explain` path)
with the authentication and settings of the tab. Plugins feature-detect
it with `hostApi.queryRequest`. Documents the Explain plugin in the user
guide.
@MathiasVDA MathiasVDA self-assigned this Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

The tests check failed on "Endpoint describe panel › doesn't query an endpoint for which autocompletion is switched off" with Node is detached from document while clicking the autocomplete checkbox (test/endpoint-describe-browser.ts:219): the panel re-rendered between finding the checkbox and clicking it. That test does not touch what this PR changes (the background query options are only used when a plugin passes them), and the same test passed on main at d43122d a few minutes earlier. Re-running the failed job once; if it fails again, the checkbox click needs a wait for the panel to settle, which is a separate fix.


Generated by Claude Code

Registers @matdata/yasgui-explain-plugin 1.0.0 as the Explain view and adds it
to the default plugin order after Chart.
@MathiasVDA MathiasVDA changed the title feat(yasr): pass extra request parameters and an endpoint to plugin queries feat: Explain view with the engine's execution plan and the SPARQL algebra Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Query execution plan

1 participant