feat: endpoint describe panel (#97) - #189
Open
MathiasVDA wants to merge 4 commits into
Open
MathiasVDA wants to merge 4 commits into
MathiasVDA wants to merge 4 commits into
Conversation
Add an "Endpoint overview" panel that helps to understand a SPARQL endpoint while writing queries. It is opened with the new "Describe endpoint" button in the control bar (or F8) and docks next to the editor. It can be pinned, collapsed to a thin rail and resized, and on small screens it opens as a bottom sheet. - Reads the SPARQL Service Description (endpoint without ?query) and VoID (/.well-known/void or embedded in the SD) and shows features, extension functions, named graphs, dataset statistics and class/property partitions. Missing sources are reported, not errors. - Bounded overview queries for all categories of the issue: named graphs (paginated), triple counts, namespaces, classes, properties, SKOS schemes, SHACL/ShEx shapes, sample instances, hubs, languages, links and time/geo (incl. a bounding box computed from WKT samples). Queries only run on demand; expensive ones are flagged. - Results are cached per endpoint in their own storage key, so they survive new queries, tab switches and reloads, without risking the main configuration when the storage quota is exceeded. - Clicking an IRI inserts it (prefixed, adding the PREFIX) into the query; describe queries can be opened in a new tab. - Queries and categories are configurable via `endpointDescribe`. - Tab gets `runBackgroundQuery` / `getRequestInit`, and yasqe's `executeQuery` a `skipGraphArgs` option. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEbQuDzCkbQKKsARAXTpKu
…eference Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEbQuDzCkbQKKsARAXTpKu
Findings from running the panel against DBpedia, Wikidata and data.europa.eu: - The namespaces query used a REPLACE() pattern that matches the empty string, which Virtuoso rejects. Use "[^#/]+$" and add a regression test. - Virtuoso "anytime queries" (DBpedia) answer HTTP 206 / X-SQL-State S1TAT with incomplete, often empty results. Such results are now marked as partial instead of looking like "no data". - Error pages are summarized: HTML bodies (Wikimedia 429, gateway 504) are reduced to their title, 429 explains the rate limiting (with Retry-After), and Java stack traces (Blazegraph) are reduced to their root cause. - Wikidata's service description is ~19 MB. SD/VoID documents are now read up to 5 MB, parsed up to the last complete statement and flagged as truncated; partition de-duplication no longer is quadratic. - Blank-node VoID datasets are no longer shown as IRIs and datasets without any information are dropped. - SKOS concept schemes is flagged as possibly slow (timed out on data.europa.eu). - runQuery() now uses the endpoint of the active tab even when the panel is closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DEbQuDzCkbQKKsARAXTpKu
This branch has not been deployed
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.
Closes #97
Summary
Adds an Endpoint overview panel for getting to know an unfamiliar SPARQL endpoint while writing queries. Open it with the new Describe endpoint button in the tab control bar (also in the mobile menu) or with
F8.Panel behaviour
Service Description and VoID
?query;/.well-known/void, or embedded in the SD.Overview queries
LIMIT.206/X-SQL-State: S1TAT, often with an empty result.429) is explained, includingRetry-After;Remembered results
Working with results
PREFIXline.Configuration
endpointDescribeoption:enabled,queries,categories,timeoutMs,maxConcurrentQueries,fetchMetadata.API additions
Tab.runBackgroundQuery()andTab.getRequestInit().yasgui.endpointDescribe.skipGraphArgsoption on yasqe'sexecuteQuery.Other
n3added to the yasgui dependencies (already used by yasr).Documentation
F8entry under keyboard shortcuts.yasgui.endpointDescribe,tab.runBackgroundQuery()andtab.getRequestInit().Testing
Live endpoints. Every query was run against DBpedia (Virtuoso), Wikidata (Blazegraph) and data.europa.eu (Virtuoso). SD/VoID discovery was run against all three, and the panel itself was run in headless Chromium against Wikidata and data.europa.eu.
named-graphs/graph-sizeson Wikidata, which runs in triples mode.206results looked like complete results;runQuery()did nothing on a closed panel.data-interop.era.europa.eu) could not be reached from the development environment.Unit tests:
REPLACEpatterns that match the empty string, LIMIT/OFFSET pagination, per-class sample generation, WKT bounding box;429/504/Blazegraph errors;skipGraphArgs.Browser tests (Puppeteer, against a mocked endpoint):
429messages;Other checks:
mainmerged in:npm run build,npm run unit-test(180 passing) andnpm run puppeteer-test(47 passing).🤖 Generated with Claude Code
https://claude.ai/code/session_01DEbQuDzCkbQKKsARAXTpKu