You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While the examples above show querying over multiple documents in Solid pods,
51
+
<ahref="/docs/query/advanced/source_types/">other types of sources</a> (such as SPARQL endpoints, RDF files, etc.) can also be used in combination with Solid pods in the same query.
52
+
</div>
53
+
54
+
## 2. Query specific private documents in Solid pods
55
+
56
+
Similar to the previous approach, you can also query specific documents in Solid pods that require authentication.
57
+
58
+
For this, you can use Comunica in combination with libraries such as [@inrupt/solid-client-authn-node](https://www.npmjs.com/package/@inrupt/solid-client-authn-node)
59
+
and [@inrupt/solid-client-authn-browser](https://www.npmjs.com/package/@inrupt/solid-client-authn-browser) that allow you to authenticate with your Solid WebID.
26
60
These libraries provide a custom `fetch` function, using which you can execute authenticated HTTP requests.
27
61
28
62
You can forward this fetch function to Comunica SPARQL to make it perform authenticated queries to pods as shown below.
29
63
64
+
**Querying from JavaScript with Comunica SPARQL**:
allows you to pass your authenticated Solid session object.
91
+
Alternatively, you can use the dedicated [Comunica SPARQL Solid](https://github.com/comunica/comunica-feature-solid/tree/master/engines/query-sparql-solid),
92
+
which allows you to pass your authenticated Solid session object.
54
93
Hereafter, we list some examples on how to use it from JavaScript and the command line.
55
94
Please refer to the [README of Comunica SPARQL Solid](https://github.com/comunica/comunica-feature-solid/tree/master/engines/query-sparql-solid#readme)
56
95
for more details.
57
96
58
-
**Querying from JavaScript**:
97
+
**Querying from JavaScript Comunica SPARQL Solid**:
@@ -101,21 +140,21 @@ Please be aware that that there are several [open known issues](https://github.c
101
140
102
141
[LDflex](/docs/query/usage/#ldflex) and [GraphQL-LD](/docs/query/usage/#graphql-ld) are examples of tools that ship with Comunica SPARQL Solid.
103
142
104
-
## Query pods using link traversal
143
+
## 3. Query pods using link traversal
105
144
106
145
The approaches for querying Solid mentioned above require you to know upfront in which pod and in which documents
107
146
your data resides before you can query over it.
108
147
[_Comunica SPARQL Link Traversal Solid_](https://github.com/comunica/comunica-feature-link-traversal/tree/master/engines/query-sparql-link-traversal-solid#comunica-sparql-link-traversal)
109
148
provides a way to query over Solid pods without having to know beforehand in which documents the necessary data resides in.
110
149
It does this by following links between documents _during query execution_.
111
150
112
-
This is still an experimental query approach, which does not yet work well for complex queries.
151
+
This is still an **experimental query approach**, which does not yet work well for complex queries.
113
152
Learn more about active [research on link traversal in Solid](https://comunica.dev/research/link_traversal/).
114
153
115
154
The example below executes a query across multiple simulated Solid pods to find all messages by a certain creator:
0 commit comments