Repository navigation
Description
#2007 gives dataset and graph references one grammar and one resolver, and it's deliberately part 1 of two: it changes how references parse and resolve, not which execution lane serves a shape. Part 2 is lane consolidation, plus retiring the string readers of dataset text that are still around. Each of those reads a dataset its own way, and where one disagrees with the parser, the query runs on one reading while the server prepares for another. This is part 2's checklist; #1975 and #1996 are the two existing issues it covers.
Lanes:
- docs: the "Ledger-Bound Mode" example (
FROM <mydb:main>+GRAPH <g>) returns no rows #1975, the whole-ledgerFROMconvention: a dataset clause that is exactly oneFROMnaming a whole ledger selects the ledger with its named graphs. The injectedFROM <L>/FROM <L@t:N>/FROM <L:main@iso:…>spellings should answer under it too. This is also whereurn:defaulton the query side gets settled (from fix: JSON-LD graph scoping, config integrity and explicit-only SHACL #2009): SPARQLFROM <ledger>plusGRAPH <urn:default>reads nothing today (aFROMdataset has no named graphs, per §13.2), and so do a queryfromNamedalias whose graph isurn:default, and a?gbound insideGRAPH <urn:default>and then used inGRAPH ?g. - Streaming queries can't read named graphs under policy or at a time pin: no streaming entry point takes a prepared GraphDb #1996, streaming on the view lane:
/stream/query/{L}@pin, the CLI's NDJSON--at(local and remote), and TSV/CSV with--remote --aton pinned paths (they keep the old rewrite today). The embedded API's stream path should answer the same rows as the buffered one. - JSON-LD
from/fromNamedon the view path, resolved as within-ledger datasets (refused there today). - A dataset's
/explainplans the dataset; today it plans the single view.
Readers of dataset text:
- The advisory header.
x-fdb-warningis still computed by route-level walkers:needs_default_graph_injectionandjsonld_dataset_semantics_warning_headersread only the top-levelfrom/fromNamed/from-named, and the SPARQL twin doesn't look insideEXISTS. So the header can differ fromQueryResult::advisories, which reads the lowered query. Render the header, and the MCP envelope, fromadvisories. - Refresh and min-t collection (
refreshable_ledger_id,refreshable_ledger_id_and_t,collect_refreshable_jsonld_ledgers,collect_jsonld_min_t_requirements, andcollect_sparql_min_t_requirementswithiri_to_string, all in the server'sroutes/query.rs) skip any text that starts withurn:or contains://, read JSON-LDfrom/fromNamedat the top level only (notopts, notledger), and don't expand a SPARQL prefixed name. A ledger named any of those ways isn't refreshed before the query, and its@t:pin sets no min-t requirement. (The multi-query route already reads its members from validation.) -
pin_jsonld_dataset(a pinned ledger path) walks every dataset key, top level andoptsalike, where the parser reads one of each pair. - MCP's
load_addressrenders a parsed address back to text for the loader to parse again. It round-trips and no divergence is known, so this is just passing the parsed address through. - Once those are gone, one dataset parse per
/queryrequest, which was the design's goal. -
ledger_info()andledger_cached()parse withLedgerRef::parse. Today they useLedgerId::parse, so aurn:fluree:id is refused there ("branch cannot contain ':'").
Config:
-
f:ledgeris read only as an IRI reference, and a slashed ledger id has no absolute IRI spelling of its own, so cross-ledger config likef:ledger <org/governance:main>relies on a relative reference (fix(transact): retractions name stored facts; RDF text is parsed once #2008 kept that working inside TriGGRAPHblocks through a parser option). Accepting a string literal there, or documenting fix: typed dataset and graph references: one grammar, one resolver #2007'surn:fluree:address as the absolute spelling if it reads cleanly in that position, would let config stop depending on relative-reference leniency.
Related existing issues: #1975, #1996 (attached here as sub-issues).
From #2007 (Not in this PR: lane consolidation; Deviations from the design), #2008 (Follow-ups: f:ledger) and #2009 (Follow-ups: query-side urn:default).
Activity
FROM <mydb:main>+GRAPH <g>) returns no rows #1975