@stonecrop/graphql-client 0.12.6 → 0.12.7

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.
Files changed (2) hide show
  1. package/README.md +7 -1
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Transport layer for Stonecrop GraphQL APIs. Handles HTTP communication, response parsing, and metadata caching.
4
4
 
5
+ ## Why transport-only?
6
+
7
+ This client intentionally never constructs GraphQL queries. All query generation — including PostGraphile-specific field naming (inflection), nested link sub-selections, and fetch strategy dispatch — lives in the server-side middleware (`@stonecrop/graphql-middleware`).
8
+
9
+ This boundary exists because PostGraphile's schema naming is configurable. An application might use `ById` for UUID primary keys, `ByRowId` for `row_id` columns, or entirely custom conventions. If the client hardcoded any of these conventions, it would silently produce wrong queries for non-default setups. The middleware owns the single `StonecropInflectionConfig` — the client only knows how to pass `options.includeNested` through to the `stonecropRecord` resolver and receive pre-merged flat data.
10
+
5
11
  ## Responsibilities
6
12
 
7
13
  **Transport** — The client sends requests and parses responses. It doesn't construct queries.
@@ -13,7 +19,7 @@ Transport layer for Stonecrop GraphQL APIs. Handles HTTP communication, response
13
19
  | Operation | Arguments | Returns |
14
20
  |-----------|-----------|---------|
15
21
  | `stonecropRecord` | `doctype`, `id`, `options?` | `{ record, unknownLinks? }` |
16
- | `stonecropRecords` | `doctype`, `filters?`, `orderBy?`, `limit?`, `offset?` | `{ data[], count }` |
22
+ | `stonecropRecords` | `doctype`, `filters?`, `orderBy?`, `limit?`, `offset?`, `options?` | `{ data[], count }` |
17
23
  | `stonecropMeta` | `doctype` | `DoctypeMeta` |
18
24
  | `stonecropAllMeta` | — | `DoctypeMeta[]` |
19
25
  | `stonecropAction` | `doctype`, `action`, `args?` | `{ success, data, error }` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stonecrop/graphql-client",
3
- "version": "0.12.6",
3
+ "version": "0.12.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "author": {
@@ -30,10 +30,10 @@
30
30
  ],
31
31
  "sideEffects": false,
32
32
  "dependencies": {
33
- "graphql": "^16.13.2",
33
+ "graphql": "^16.14.0",
34
34
  "pluralize": "^8.0.0",
35
- "@stonecrop/schema": "0.12.6",
36
- "@stonecrop/stonecrop": "0.12.6"
35
+ "@stonecrop/schema": "0.12.7",
36
+ "@stonecrop/stonecrop": "0.12.7"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@eslint/js": "^10.0.1",