@symbo.ls/fetch 3.14.589 → 3.14.595
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/README.md +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -7,12 +7,6 @@ Declarative data fetching for DOMQL with pluggable adapters. Supports caching, s
|
|
|
7
7
|
Add `fetch` to `config.js` — this is the connection/adapter config (distinct from the per-element `fetch` query declaration; the runtime resolves it onto `context.fetch`):
|
|
8
8
|
|
|
9
9
|
```js
|
|
10
|
-
// Supabase
|
|
11
|
-
fetch: { adapter: 'supabase', projectId: '...', key: '...' }
|
|
12
|
-
|
|
13
|
-
// Supabase — config from state
|
|
14
|
-
fetch: { adapter: 'supabase', state: 'supabase' } // merges root state.supabase
|
|
15
|
-
|
|
16
10
|
// REST
|
|
17
11
|
fetch: {
|
|
18
12
|
adapter: 'rest',
|
|
@@ -32,6 +26,12 @@ fetch: { adapter: 'local', data: { articles: [] }, persist: true }
|
|
|
32
26
|
|
|
33
27
|
// Custom/registered adapter (see Registering a named adapter)
|
|
34
28
|
fetch: { adapter: 'sdk', sdk: getSDK() }
|
|
29
|
+
|
|
30
|
+
// Supabase — one of the built-in adapters, for apps bringing their own Supabase project
|
|
31
|
+
fetch: { adapter: 'supabase', projectId: '...', key: '...' }
|
|
32
|
+
|
|
33
|
+
// Supabase — config from state
|
|
34
|
+
fetch: { adapter: 'supabase', state: 'supabase' } // merges root state.supabase
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
> `db` is **not** a config key — it's the local name for the resolved adapter you get from `await this.getDB()` (`db.select(...)`, `db.insert(...)`, …).
|