The RDF data model represents information as triples: subject, predicate, object. A named graph adds a fourth component — a graph name — turning each triple into a quad: (subject, predicate, object, graph-IRI). This lets you group triples into labelled subsets within a single store.
(subject, predicate, object, graph-IRI)
A SPARQL query executes against an RDF dataset, which has two parts:
{ ?s ?p ?o }
GRAPH
GRAPH <uri> { ?s ?p ?o }
GRAPH ?g { ?s ?p ?o }
The GRAPH keyword changes the active graph for pattern matching within that part of the query. Outside a GRAPH clause, patterns match against the default graph.
One way to think about it: a named-graph RDF store is a set of quads where the fourth element is the graph IRI, which may be empty (the default graph).
RDF Studio uses named graphs to enforce semantic separation — each type of knowledge lives in its own graph. This separation is what allows the reasoner, the editors, and the query engine to work on the right subset of data without confusion.
Graphs come in two families, and the difference matters when you connect RDF Studio to a triplestore you already own.
Your content graphs — they hold your material, so they are named in your namespace, the one the database declares:
data
https://rdf-studio.com/northwind/graph/data
ontology
https://rdf-studio.com/northwind/graph/ontology
taxonomy
https://rdf-studio.com/northwind/graph/taxonomy
shapes
https://rdf-studio.com/northwind/graph/shapes
RDF Studio's own graphs — bookkeeping the application needs, always named on rdf-studio.com under your database's name:
rdf-studio.com
query
https://rdf-studio.com/northwind/graph/query
config
https://rdf-studio.com/northwind/graph/config
namespace
https://rdf-studio.com/northwind/graph/namespace
The convention is the same shape in both cases — {base}/graph/{type} — with a different base. That is deliberate: when you point RDF Studio at your triplestore, its bookkeeping graphs stay on our domain rather than minting IRIs inside yours, so "which graphs did RDF Studio create?" is answerable by looking at them. Northwind is a sample we ship, so both families happen to share the same base.
{base}/graph/{type}
The Northwind namespaces file declares the prefix nwg: for its graph base, which is why the shipped queries can write GRAPH nwg:data instead of a full IRI.
nwg:
GRAPH nwg:data
The actual IRIs for your database are shown in Connect ▸ Databases ▸ card ⋮ ▸ Config ▸ Named Graphs.
This is where triplestores differ most — and where users coming from other tools are most likely to be surprised.
Per the spec, if you don't put any data in the default graph, a bare SELECT * WHERE { ?s ?p ?o } returns nothing — because there's nothing to match against. This is technically correct but practically useless. In RDF Studio, all data lives in named graphs.
SELECT * WHERE { ?s ?p ?o }
query.all.graphs=true
RDF Studio uses Oxigraph's union default graph mode (use_default_graph_as_union=True). The default graph is a read-only virtual view over all named graphs computed at query time. Nothing is stored there. No data is copied.
use_default_graph_as_union=True
This means:
GRAPH <data> { ?s ?p ?o }
This is the same behaviour as RDFox in its default union graph mode, and the same as Neptune's architectural choice. It's the cleanest semantics available.
The GraphDB/Stardog-union approach stores (or presents) data in both the default graph and the named graph. So a query like this:
SELECT ?g ?s ?p ?o WHERE { { GRAPH ?g { ?s ?p ?o } } UNION { ?s ?p ?o BIND("default" AS ?g) } }
…returns every triple twice on GraphDB: once from the named graph, once from the "default" which is a copy of it.
On RDF Studio, the same query returns each triple once, because the default graph IS the named graph content — not a copy.
SELECT ?s ?p ?o WHERE { ?s ?p ?o }
Returns triples from all named graphs. No GRAPH clause needed.
SELECT ?s ?p ?o WHERE { GRAPH <https://rdf-studio.com/northwind/graph/data> { ?s ?p ?o } }
Returns only instance data — ontology, taxonomy and shape triples are excluded.
SELECT ?g (COUNT(*) AS ?count) WHERE { GRAPH ?g { ?s ?p ?o } } GROUP BY ?g ORDER BY DESC(?count)
SELECT ?s ?p ?o WHERE { { GRAPH <https://rdf-studio.com/northwind/graph/data> { ?s ?p ?o } } UNION { GRAPH <https://rdf-studio.com/northwind/graph/ontology> { ?s ?p ?o } } }
PREFIX nwo: <http://example.org/ontology/northwind#> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> SELECT ?instance ?label WHERE { GRAPH <https://rdf-studio.com/northwind/graph/data> { ?instance a nwo:Customer . } GRAPH <https://rdf-studio.com/northwind/graph/ontology> { nwo:Customer rdfs:label ?label . } }
You can use the standard SPARQL FROM NAMED syntax to define the dataset for a query — this overrides the default graph union behaviour for that query only:
FROM NAMED
SELECT ?s ?p ?o FROM NAMED <https://rdf-studio.com/northwind/graph/data> WHERE { GRAPH ?g { ?s ?p ?o } }
This returns only data-graph triples. The ?g variable binds to the data graph IRI.
?g
The SPARQL editor's autocomplete knows your database's named graph IRIs. When you type < in a GRAPH clause or a FROM NAMED clause, the editor shows a dropdown of all available graph URIs from the active database. This prevents typos and eliminates the need to memorise long URIs.
<
The graph filter (¶ icon in the toolbar) controls which named graphs are queried by the Explore and Visualize tabs. It does NOT affect the Query Editor — the Query Editor always queries everything and lets you control scoping with SPARQL syntax.
Available filter presets:
The Explore and Visualize tabs always send explicit named graph URIs in their SPARQL queries (e.g. GRAPH <data> { ... }). They never rely on the virtual union default graph — the filter is always unambiguous.
GRAPH <data> { ... }
When you run DESCRIBE <uri> in the Query Editor, the result includes triples from all named graphs where that subject appears. For most instances, this means:
DESCRIBE <uri>
rdf:type
This is expected and complete — the Query Editor is designed to give the full unfiltered view of a resource. If you want to scope a DESCRIBE to just the data graph:
DESCRIBE
DESCRIBE <http://example.org/northwind/order-10485> FROM NAMED <https://rdf-studio.com/northwind/graph/data>
Located in Connect ▸ Databases ▸ card ⋮ ▸ Config ▸ Named Graphs, this toggle controls Oxigraph's union default graph mode per database. It defaults to ON.
FROM
This setting only affects the Query Editor. Browse, Traverse, and Visualize always use explicit GRAPH clauses and are unaffected by this toggle.
stardog:context:named
stardog:context:all
stardog:context:default