@acodera/shopify-admin-mcp 1.1.0 → 1.2.0
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 +22 -0
- package/README.md +33 -12
- package/dist/graphql/client.js +19 -2
- package/dist/graphql/client.js.map +1 -1
- package/dist/graphql/schema-index.d.ts +9 -0
- package/dist/graphql/schema-index.js +58 -8
- package/dist/graphql/schema-index.js.map +1 -1
- package/dist/index.js +22 -19
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +3 -3
- package/dist/server.js +20 -8
- package/dist/server.js.map +1 -1
- package/dist/tools/collections.js +1 -0
- package/dist/tools/collections.js.map +1 -1
- package/dist/tools/customers.js +3 -0
- package/dist/tools/customers.js.map +1 -1
- package/dist/tools/discounts.js +37 -17
- package/dist/tools/discounts.js.map +1 -1
- package/dist/tools/files.js +2 -1
- package/dist/tools/files.js.map +1 -1
- package/dist/tools/graphql-proxy.d.ts +2 -1
- package/dist/tools/graphql-proxy.js +23 -9
- package/dist/tools/graphql-proxy.js.map +1 -1
- package/dist/tools/inventory.js +1 -0
- package/dist/tools/inventory.js.map +1 -1
- package/dist/tools/markets.js +5 -1
- package/dist/tools/markets.js.map +1 -1
- package/dist/tools/orders.js +3 -0
- package/dist/tools/orders.js.map +1 -1
- package/dist/tools/products.js +8 -2
- package/dist/tools/products.js.map +1 -1
- package/dist/tools/publishing.js +2 -1
- package/dist/tools/publishing.js.map +1 -1
- package/dist/tools/schema-search.d.ts +2 -2
- package/dist/tools/schema-search.js +6 -3
- package/dist/tools/schema-search.js.map +1 -1
- package/dist/tools/theme-guard.d.ts +14 -0
- package/dist/tools/theme-guard.js +81 -0
- package/dist/tools/theme-guard.js.map +1 -0
- package/dist/tools/themes.js +10 -18
- package/dist/tools/themes.js.map +1 -1
- package/dist/utils/cli.d.ts +2 -0
- package/dist/utils/cli.js +27 -10
- package/dist/utils/cli.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @acodera/shopify-admin-mcp
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#9](https://github.com/acoderacom/shopify-admin-mcp/pull/9) [`4ffbe0b`](https://github.com/acoderacom/shopify-admin-mcp/commit/4ffbe0be98eb30b25a24ae6a05486346db66508d) Thanks [@acoderacom](https://github.com/acoderacom)! - Apply the live-theme guard to `shopify_graphql`: `themeFilesUpsert`, `themeFilesDelete`, and `themeFilesCopy` are refused when they target the live theme, and `themePublish` is refused, unless the server runs with `--allow-live-theme-writes`. Previously raw GraphQL could skip the guard the theme tools enforce. Add `--disable-raw-graphql` (`SHOPIFY_DISABLE_RAW_GRAPHQL`) to leave out `shopify_graphql`, so `--toolsets` limits what the assistant can reach.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [#9](https://github.com/acoderacom/shopify-admin-mcp/pull/9) [`4ffbe0b`](https://github.com/acoderacom/shopify-admin-mcp/commit/4ffbe0be98eb30b25a24ae6a05486346db66508d) Thanks [@acoderacom](https://github.com/acoderacom)! - Discount create tools reject inputs Shopify can't apply as asked. Combining `customerIds`, `customerSegmentIds`, and `marketIds` used to fail at Shopify, because a discount takes one kind of eligibility. Passing `collectionIds` together with `productIds` or `variantIds` used to drop the products and variants without a word.
|
|
12
|
+
|
|
13
|
+
- [#9](https://github.com/acoderacom/shopify-admin-mcp/pull/9) [`4ffbe0b`](https://github.com/acoderacom/shopify-admin-mcp/commit/4ffbe0be98eb30b25a24ae6a05486346db66508d) Thanks [@acoderacom](https://github.com/acoderacom)! - Nested lists with a fixed size (product variants and metafields, order line items, inventory levels, customer addresses and orders, theme files, publications, market regions, and more) now include `pageInfo.hasNextPage`, and `shopify_product_get` returns `variantsCount`, so the assistant can tell when results were cut short. Product tools accept the `UNLISTED` status. `shopify_theme_files_get` flags files it couldn't read as an error, and `shopify_file_upload` reports Shopify's reason when a staged upload is rejected instead of a JavaScript error.
|
|
14
|
+
|
|
15
|
+
- [#9](https://github.com/acoderacom/shopify-admin-mcp/pull/9) [`4ffbe0b`](https://github.com/acoderacom/shopify-admin-mcp/commit/4ffbe0be98eb30b25a24ae6a05486346db66508d) Thanks [@acoderacom](https://github.com/acoderacom)! - The server checks credentials with a small `shop` query and connects before introspecting the schema, so a slow introspection no longer delays the client's handshake; schema tools wait for it and retry it if it failed. HTTP 429 responses honor `Retry-After` (up to a minute), and discarded responses are released before retrying. `shopify_schema_details` lists root types by name and shortens descriptions on very large types, `shopify_schema_search` rejects an empty query, and the server sends usage instructions to MCP clients.
|
|
16
|
+
|
|
17
|
+
## 1.1.1
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- [#7](https://github.com/acoderacom/shopify-admin-mcp/pull/7) [`04f9a39`](https://github.com/acoderacom/shopify-admin-mcp/commit/04f9a39f77ffc3e207e355f758a5141dfe1f127b) Thanks [@acoderacom](https://github.com/acoderacom)! - Treat blank values and unfilled `${VAR}` / `$VAR` references as not set for every option, so a config can list both an access token and client credentials and use whichever is filled in (previously a literal `${SHOPIFY_ACCESS_TOKEN}` was sent as the token). The startup log now names the authentication method, and incomplete client credentials report which value is missing.
|
|
22
|
+
|
|
23
|
+
- [#7](https://github.com/acoderacom/shopify-admin-mcp/pull/7) [`c062f3a`](https://github.com/acoderacom/shopify-admin-mcp/commit/c062f3a022a7da493b46dee9b9eca8c1835bd980) Thanks [@acoderacom](https://github.com/acoderacom)! - Upgrade `graphql` (used to parse raw GraphQL in read-only mode) from 16 to 17. No behavior change: mutations and subscriptions are still detected and blocked the same way.
|
|
24
|
+
|
|
3
25
|
## 1.1.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
[](https://github.com/acoderacom/shopify-admin-mcp/actions/workflows/ci.yml)
|
|
5
5
|
[](LICENSE)
|
|
6
6
|
|
|
7
|
-
MCP server providing full access to Shopify's Admin GraphQL API. Targets API version **2026-10** by default and introspects the live schema
|
|
7
|
+
MCP server providing full access to Shopify's Admin GraphQL API. Targets API version **2026-10** by default and introspects the live schema as soon as it starts, so your AI assistant always sees the exact API your store is serving.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
|
-
- **Raw GraphQL execution** — run any query or mutation against the Admin API
|
|
11
|
+
- **Raw GraphQL execution** — run any query or mutation against the Admin API, or turn it off with `--disable-raw-graphql`
|
|
12
12
|
- **Live schema introspection** — search and explore the full GraphQL schema directly from your AI assistant
|
|
13
13
|
- **59 convenience tools** — typed, no-GraphQL-needed tools for products and variants, collections, publishing, metafields and metaobjects (including definitions), customers, orders, inventory, discounts, file uploads, themes, and markets
|
|
14
14
|
- **Toolsets** — register only the areas you need to keep the assistant's tool list short
|
|
@@ -43,7 +43,7 @@ Add `--read-only` (or `SHOPIFY_READ_ONLY=true`) when the assistant only needs to
|
|
|
43
43
|
|
|
44
44
|
| Tool | Description |
|
|
45
45
|
|------|-------------|
|
|
46
|
-
| `shopify_graphql` | Execute any raw GraphQL query or mutation (queries only in read-only mode) |
|
|
46
|
+
| `shopify_graphql` | Execute any raw GraphQL query or mutation (queries only in read-only mode; left out with `--disable-raw-graphql`) |
|
|
47
47
|
| `shopify_schema_search` | Search the live schema by keyword (types, queries, mutations) |
|
|
48
48
|
| `shopify_schema_details` | Get full details for a specific type, query, or mutation |
|
|
49
49
|
|
|
@@ -138,7 +138,7 @@ Convenience tools are grouped into toolsets (shown in brackets), which you can s
|
|
|
138
138
|
| `shopify_discount_delete` | Delete a discount |
|
|
139
139
|
| `shopify_discount_codes_add` | Add up to 250 extra codes to a code discount |
|
|
140
140
|
|
|
141
|
-
All create tools accept start and end dates, minimum subtotal or quantity, usage limits (codes only), which other discounts they combine with, and eligibility by customer, customer segment, or market. Percentages are given as whole numbers (`20` = 20% off).
|
|
141
|
+
All create tools accept start and end dates, minimum subtotal or quantity, usage limits (codes only), which other discounts they combine with, and eligibility by customer, customer segment, or market. Shopify takes one kind of eligibility per discount, so give at most one of `customerIds`, `customerSegmentIds`, or `marketIds`. Discounted items are chosen by collection or by product and variant, not both. Percentages are given as whole numbers (`20` = 20% off).
|
|
142
142
|
|
|
143
143
|
### Files `[files]`
|
|
144
144
|
|
|
@@ -202,7 +202,9 @@ All toolsets are registered by default. To keep the assistant's tool list short,
|
|
|
202
202
|
--toolsets products,collections,publishing,files
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
Available toolsets: `products`, `collections`, `publishing`, `metafields`, `metaobjects`, `customers`, `orders`, `inventory`, `discounts`, `files`, `themes`, `markets`.
|
|
205
|
+
Available toolsets: `products`, `collections`, `publishing`, `metafields`, `metaobjects`, `customers`, `orders`, `inventory`, `discounts`, `files`, `themes`, `markets`. Schema search is always available, and so is raw GraphQL unless you turn it off.
|
|
206
|
+
|
|
207
|
+
Toolsets shorten the tool list, but `shopify_graphql` can still run any query or mutation the app's access scopes allow. To keep the assistant to the selected toolsets, add `--disable-raw-graphql` (or `SHOPIFY_DISABLE_RAW_GRAPHQL=true`). Either way, the app's access scopes are what actually limit what the server can do, so grant only the scopes you need.
|
|
206
208
|
|
|
207
209
|
## File Uploads
|
|
208
210
|
|
|
@@ -218,7 +220,9 @@ Theme file tools read any theme, but by default they refuse to write to or delet
|
|
|
218
220
|
2. edit the copy with `shopify_theme_files_upsert`
|
|
219
221
|
3. preview and publish it from the Shopify admin
|
|
220
222
|
|
|
221
|
-
|
|
223
|
+
`shopify_graphql` applies the same guard: `themeFilesUpsert`, `themeFilesDelete`, and `themeFilesCopy` are checked against the theme they target, and `themePublish` is refused, because publishing replaces the live theme.
|
|
224
|
+
|
|
225
|
+
Start the server with `--allow-live-theme-writes` (or `SHOPIFY_ALLOW_LIVE_THEME_WRITES=true`) to edit or publish the live theme directly. Writing theme files needs `write_themes` and Shopify's theme-code exemption on the app.
|
|
222
226
|
|
|
223
227
|
## Required API Scopes
|
|
224
228
|
|
|
@@ -283,7 +287,8 @@ npx -y @acodera/shopify-admin-mcp
|
|
|
283
287
|
| `--read-only` | `SHOPIFY_READ_ONLY` | Expose only read tools and block mutations (`true` / `1`) |
|
|
284
288
|
| `--toolsets` | `SHOPIFY_TOOLSETS` | Comma-separated toolsets to register (default: all) |
|
|
285
289
|
| `--upload-dir` | `SHOPIFY_UPLOAD_DIR` | Directory that local file uploads are confined to (default: local uploads disabled) |
|
|
286
|
-
| `--allow-live-theme-writes` | `SHOPIFY_ALLOW_LIVE_THEME_WRITES` | Allow theme file writes and deletes on the live theme (`true` / `1`) |
|
|
290
|
+
| `--allow-live-theme-writes` | `SHOPIFY_ALLOW_LIVE_THEME_WRITES` | Allow theme file writes and deletes on the live theme, and publishing themes through raw GraphQL (`true` / `1`) |
|
|
291
|
+
| `--disable-raw-graphql` | `SHOPIFY_DISABLE_RAW_GRAPHQL` | Leave out `shopify_graphql`, so only the selected toolsets can reach the store (`true` / `1`) |
|
|
287
292
|
|
|
288
293
|
The store must be a `*.myshopify.com` domain, so credentials are only ever sent to Shopify. Secrets can still be passed as flags, but the server prints a warning because flags are visible to other processes on the machine.
|
|
289
294
|
|
|
@@ -446,6 +451,7 @@ Every flag at once, with client credentials:
|
|
|
446
451
|
"--toolsets", "products,collections,publishing,metafields,metaobjects,customers,orders,inventory,discounts,files,themes,markets",
|
|
447
452
|
"--upload-dir", "/Users/you/shopify-uploads",
|
|
448
453
|
"--allow-live-theme-writes",
|
|
454
|
+
"--disable-raw-graphql",
|
|
449
455
|
"--read-only"
|
|
450
456
|
]
|
|
451
457
|
```
|
|
@@ -469,6 +475,7 @@ Every flag has an environment variable, which you can put in `env` instead of `a
|
|
|
469
475
|
| `--upload-dir` | `SHOPIFY_UPLOAD_DIR` | Absolute folder path | local uploads disabled |
|
|
470
476
|
| `--read-only` | `SHOPIFY_READ_ONLY` | `true` or `1` turns it on | off |
|
|
471
477
|
| `--allow-live-theme-writes` | `SHOPIFY_ALLOW_LIVE_THEME_WRITES` | `true` or `1` turns it on | off |
|
|
478
|
+
| `--disable-raw-graphql` | `SHOPIFY_DISABLE_RAW_GRAPHQL` | `true` or `1` turns it on | off |
|
|
472
479
|
|
|
473
480
|
Every variable at once, with client credentials:
|
|
474
481
|
|
|
@@ -486,7 +493,8 @@ Every variable at once, with client credentials:
|
|
|
486
493
|
"SHOPIFY_TOOLSETS": "products,collections,publishing,metafields,metaobjects,customers,orders,inventory,discounts,files,themes,markets",
|
|
487
494
|
"SHOPIFY_UPLOAD_DIR": "/Users/you/shopify-uploads",
|
|
488
495
|
"SHOPIFY_READ_ONLY": "false",
|
|
489
|
-
"SHOPIFY_ALLOW_LIVE_THEME_WRITES": "false"
|
|
496
|
+
"SHOPIFY_ALLOW_LIVE_THEME_WRITES": "false",
|
|
497
|
+
"SHOPIFY_DISABLE_RAW_GRAPHQL": "false"
|
|
490
498
|
}
|
|
491
499
|
}
|
|
492
500
|
}
|
|
@@ -495,17 +503,30 @@ Every variable at once, with client credentials:
|
|
|
495
503
|
|
|
496
504
|
For a legacy token, replace `SHOPIFY_CLIENT_ID` and `SHOPIFY_CLIENT_SECRET` with `"SHOPIFY_ACCESS_TOKEN": "${SHOPIFY_ACCESS_TOKEN}"`. The `${VAR}` references work in Claude Code's `.mcp.json`; in the Claude Desktop config, write the values directly.
|
|
497
505
|
|
|
506
|
+
Blank values and unfilled variable references (`${VAR}`, `${VAR:-}`, `$VAR`) are treated as not set, for every option. That lets one config list both authentication methods and use whichever has real values, which helps with clients such as Claude Desktop that pass `${VAR}` through literally:
|
|
507
|
+
|
|
508
|
+
```json
|
|
509
|
+
"env": {
|
|
510
|
+
"SHOPIFY_STORE": "mystore.myshopify.com",
|
|
511
|
+
"SHOPIFY_ACCESS_TOKEN": "${SHOPIFY_ACCESS_TOKEN}",
|
|
512
|
+
"SHOPIFY_CLIENT_ID": "${SHOPIFY_CLIENT_ID}",
|
|
513
|
+
"SHOPIFY_CLIENT_SECRET": "${SHOPIFY_CLIENT_SECRET}"
|
|
514
|
+
}
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
The startup log on stderr says which method was used, for example `Connecting to mystore.myshopify.com (API 2026-10, client credentials)...`.
|
|
518
|
+
|
|
498
519
|
If you set the same option both ways:
|
|
499
520
|
|
|
500
521
|
- For options that take a value (`--store`, credentials, `--api-version`, `--toolsets`, `--upload-dir`), the flag wins.
|
|
501
|
-
- For on/off options (`--read-only`, `--allow-live-theme-writes`), either one turns it on. Setting the variable to `"false"` doesn't turn off a flag that's present.
|
|
522
|
+
- For on/off options (`--read-only`, `--allow-live-theme-writes`, `--disable-raw-graphql`), either one turns it on. Setting the variable to `"false"` doesn't turn off a flag that's present.
|
|
502
523
|
- If both an access token and client credentials are set, the access token is used.
|
|
503
524
|
|
|
504
525
|
Use an absolute path for `--upload-dir`, because MCP clients start the server from their own working directory, not your project's.
|
|
505
526
|
|
|
506
527
|
## Schema Exploration
|
|
507
528
|
|
|
508
|
-
The server introspects Shopify's live GraphQL schema
|
|
529
|
+
The server introspects Shopify's live GraphQL schema once it has connected, so your AI assistant can discover API capabilities in real time. Introspection runs in the background, so it doesn't delay the client's connection; a schema tool called before it finishes waits for it, and a failed introspection is retried on the next call.
|
|
509
530
|
|
|
510
531
|
```
|
|
511
532
|
You: "What mutations are available for metaobjects?"
|
|
@@ -517,7 +538,7 @@ You: "What fields does MetaobjectCreateInput take?"
|
|
|
517
538
|
→ Returns: full type definition with all fields, types, and descriptions
|
|
518
539
|
```
|
|
519
540
|
|
|
520
|
-
Deprecated fields are left out of the index, so the assistant is steered toward the current API.
|
|
541
|
+
Deprecated fields are left out of the index, so the assistant is steered toward the current API. `shopify_schema_details` on the root `QueryRoot` or `Mutation` type lists the names of every query or mutation, and very large types have their descriptions shortened so the response stays readable.
|
|
521
542
|
|
|
522
543
|
## Development
|
|
523
544
|
|
|
@@ -539,7 +560,7 @@ npm test # unit tests; live tests are skipped without credentials
|
|
|
539
560
|
npm run lint # type-check src and tests
|
|
540
561
|
```
|
|
541
562
|
|
|
542
|
-
The unit tests need no network. They cover CLI validation, the HTTP client (throttle
|
|
563
|
+
The unit tests need no network. They cover CLI validation, the HTTP client (throttle and `Retry-After` handling, token refresh), every tool's request over a real MCP connection, read-only mode, toolsets, the live-theme guard (including raw GraphQL), and upload-directory confinement.
|
|
543
564
|
|
|
544
565
|
Live integration tests run against a real store when credentials are set:
|
|
545
566
|
|
package/dist/graphql/client.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { sleep } from "../utils/sleep.js";
|
|
2
2
|
const REQUEST_TIMEOUT_MS = 60_000;
|
|
3
3
|
const MAX_THROTTLE_RETRIES = 3;
|
|
4
|
+
// A 429 asking for a longer wait than this is reported rather than waited out
|
|
5
|
+
const MAX_RETRY_AFTER_MS = 60_000;
|
|
4
6
|
function isThrottled(res) {
|
|
5
7
|
return res.errors?.some((e) => e.extensions?.code === "THROTTLED") ?? false;
|
|
6
8
|
}
|
|
@@ -14,6 +16,15 @@ function throttleDelayMs(res, attempt) {
|
|
|
14
16
|
}
|
|
15
17
|
return 1000 * (attempt + 1);
|
|
16
18
|
}
|
|
19
|
+
// Retry-After is seconds (Shopify sends e.g. "2.0") or an HTTP date
|
|
20
|
+
function retryAfterMs(res) {
|
|
21
|
+
const header = res.headers.get("retry-after")?.trim();
|
|
22
|
+
if (!header)
|
|
23
|
+
return null;
|
|
24
|
+
const seconds = Number(header);
|
|
25
|
+
const ms = Number.isFinite(seconds) ? seconds * 1000 : Date.parse(header) - Date.now();
|
|
26
|
+
return Number.isFinite(ms) ? Math.max(0, Math.ceil(ms)) : null;
|
|
27
|
+
}
|
|
17
28
|
export class GraphQLClient {
|
|
18
29
|
auth;
|
|
19
30
|
endpoint;
|
|
@@ -30,12 +41,18 @@ export class GraphQLClient {
|
|
|
30
41
|
for (let attempt = 0;; attempt++) {
|
|
31
42
|
let res = await this.post(body, await this.auth.getAccessToken());
|
|
32
43
|
if (res.status === 401 && this.auth.canRefresh) {
|
|
44
|
+
// Release the rejected response's connection before retrying
|
|
45
|
+
await res.body?.cancel();
|
|
33
46
|
res = await this.post(body, await this.auth.forceRefresh());
|
|
34
47
|
}
|
|
35
48
|
this.checkServedVersion(res);
|
|
36
49
|
if (res.status === 429 && attempt < MAX_THROTTLE_RETRIES) {
|
|
37
|
-
|
|
38
|
-
|
|
50
|
+
const delay = retryAfterMs(res) ?? 1000 * (attempt + 1);
|
|
51
|
+
if (delay <= MAX_RETRY_AFTER_MS) {
|
|
52
|
+
await res.body?.cancel();
|
|
53
|
+
await sleep(delay);
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
39
56
|
}
|
|
40
57
|
if (!res.ok) {
|
|
41
58
|
const text = await res.text();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/graphql/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAkB1C,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/graphql/client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAkB1C,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,8EAA8E;AAC9E,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAElC,SAAS,WAAW,CAAC,GAAoB;IACvC,OAAO,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,IAAI,KAAK,WAAW,CAAC,IAAI,KAAK,CAAC;AAC9E,CAAC;AAED,yEAAyE;AACzE,SAAS,eAAe,CAAC,GAAoB,EAAE,OAAe;IAC5D,MAAM,IAAI,GAAG,GAAG,CAAC,UAA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,MAAM,6DAA6D,CAC5I,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { IntrospectedSchema, IntrospectedType, IntrospectedField, IntrospectedTypeRef } from "./introspection.js";
|
|
2
|
+
export type SchemaIndexLoader = () => Promise<SchemaIndex>;
|
|
3
|
+
/**
|
|
4
|
+
* Builds the index on first use and shares it between callers. A failed load isn't cached,
|
|
5
|
+
* so the next call tries again.
|
|
6
|
+
*/
|
|
7
|
+
export declare function lazySchemaIndex(load: () => Promise<IntrospectedSchema>): SchemaIndexLoader;
|
|
2
8
|
export declare class SchemaIndex {
|
|
3
9
|
private typeMap;
|
|
4
10
|
private queryFields;
|
|
5
11
|
private mutationFields;
|
|
6
12
|
private allNames;
|
|
13
|
+
private queryTypeName;
|
|
14
|
+
private mutationTypeName;
|
|
7
15
|
constructor(schema: IntrospectedSchema);
|
|
8
16
|
search(keyword: string, filter?: "all" | "types" | "queries" | "mutations", limit?: number): {
|
|
9
17
|
types: string[];
|
|
@@ -16,6 +24,7 @@ export declare class SchemaIndex {
|
|
|
16
24
|
formatTypeRef(ref: IntrospectedTypeRef): string;
|
|
17
25
|
formatFieldSummary(field: IntrospectedField): string;
|
|
18
26
|
getDetails(name: string): string | null;
|
|
27
|
+
private formatRootType;
|
|
19
28
|
private formatType;
|
|
20
29
|
private formatFieldDetails;
|
|
21
30
|
}
|
|
@@ -1,9 +1,36 @@
|
|
|
1
|
+
// Type details longer than this shorten their descriptions to keep the response readable
|
|
2
|
+
const MAX_DETAILS_LENGTH = 20_000;
|
|
3
|
+
// First sentence of a description, capped so one long sentence can't dominate
|
|
4
|
+
function shorten(description) {
|
|
5
|
+
const sentence = description.split(/(?<=\.)\s/)[0] ?? description;
|
|
6
|
+
return sentence.length > 160 ? `${sentence.slice(0, 157)}...` : sentence;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Builds the index on first use and shares it between callers. A failed load isn't cached,
|
|
10
|
+
* so the next call tries again.
|
|
11
|
+
*/
|
|
12
|
+
export function lazySchemaIndex(load) {
|
|
13
|
+
let pending = null;
|
|
14
|
+
return () => {
|
|
15
|
+
pending ??= load()
|
|
16
|
+
.then((schema) => new SchemaIndex(schema))
|
|
17
|
+
.catch((err) => {
|
|
18
|
+
pending = null;
|
|
19
|
+
throw err;
|
|
20
|
+
});
|
|
21
|
+
return pending;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
1
24
|
export class SchemaIndex {
|
|
2
25
|
typeMap = new Map();
|
|
3
26
|
queryFields = new Map();
|
|
4
27
|
mutationFields = new Map();
|
|
5
28
|
allNames = [];
|
|
29
|
+
queryTypeName;
|
|
30
|
+
mutationTypeName;
|
|
6
31
|
constructor(schema) {
|
|
32
|
+
this.queryTypeName = schema.queryTypeName;
|
|
33
|
+
this.mutationTypeName = schema.mutationTypeName;
|
|
7
34
|
for (const type of schema.types) {
|
|
8
35
|
if (type.name.startsWith("__"))
|
|
9
36
|
continue;
|
|
@@ -82,9 +109,20 @@ export class SchemaIndex {
|
|
|
82
109
|
return `${field.name}${args}: ${this.formatTypeRef(field.type)}`;
|
|
83
110
|
}
|
|
84
111
|
getDetails(name) {
|
|
112
|
+
// The root types hold every query or mutation, far too many to describe in one response
|
|
113
|
+
if (name === this.queryTypeName)
|
|
114
|
+
return this.formatRootType(name, "queries", this.queryFields);
|
|
115
|
+
if (name === this.mutationTypeName)
|
|
116
|
+
return this.formatRootType(name, "mutations", this.mutationFields);
|
|
85
117
|
const type = this.typeMap.get(name);
|
|
86
|
-
if (type)
|
|
87
|
-
|
|
118
|
+
if (type) {
|
|
119
|
+
for (const style of ["full", "short"]) {
|
|
120
|
+
const details = this.formatType(type, style);
|
|
121
|
+
if (details.length <= MAX_DETAILS_LENGTH)
|
|
122
|
+
return details;
|
|
123
|
+
}
|
|
124
|
+
return `${this.formatType(type, "none")}\n\n(Descriptions omitted because ${name} has too many members to describe in one response.)`;
|
|
125
|
+
}
|
|
88
126
|
const query = this.queryFields.get(name);
|
|
89
127
|
if (query)
|
|
90
128
|
return this.formatFieldDetails("Query", name, query);
|
|
@@ -93,7 +131,21 @@ export class SchemaIndex {
|
|
|
93
131
|
return this.formatFieldDetails("Mutation", name, mutation);
|
|
94
132
|
return null;
|
|
95
133
|
}
|
|
96
|
-
|
|
134
|
+
formatRootType(name, category, fields) {
|
|
135
|
+
return [
|
|
136
|
+
`# ${name} (${fields.size} ${category})`,
|
|
137
|
+
"",
|
|
138
|
+
`Call shopify_schema_details with one of these names for its arguments and return type, or use shopify_schema_search to narrow them down:`,
|
|
139
|
+
"",
|
|
140
|
+
Array.from(fields.keys()).sort().join(", "),
|
|
141
|
+
].join("\n");
|
|
142
|
+
}
|
|
143
|
+
formatType(type, style) {
|
|
144
|
+
const describe = (description) => {
|
|
145
|
+
if (!description || style === "none")
|
|
146
|
+
return "";
|
|
147
|
+
return ` — ${style === "short" ? shorten(description) : description}`;
|
|
148
|
+
};
|
|
97
149
|
const lines = [];
|
|
98
150
|
lines.push(`# ${type.name} (${type.kind})`);
|
|
99
151
|
if (type.description)
|
|
@@ -104,14 +156,13 @@ export class SchemaIndex {
|
|
|
104
156
|
if (type.fields && type.fields.length > 0) {
|
|
105
157
|
lines.push("\n## Fields\n");
|
|
106
158
|
for (const field of type.fields) {
|
|
107
|
-
|
|
108
|
-
lines.push(`- ${this.formatFieldSummary(field)}${desc}`);
|
|
159
|
+
lines.push(`- ${this.formatFieldSummary(field)}${describe(field.description)}`);
|
|
109
160
|
}
|
|
110
161
|
}
|
|
111
162
|
if (type.inputFields && type.inputFields.length > 0) {
|
|
112
163
|
lines.push("\n## Input Fields\n");
|
|
113
164
|
for (const field of type.inputFields) {
|
|
114
|
-
const desc = field.description
|
|
165
|
+
const desc = describe(field.description);
|
|
115
166
|
const def = field.defaultValue != null ? ` (default: ${field.defaultValue})` : "";
|
|
116
167
|
lines.push(`- ${field.name}: ${this.formatTypeRef(field.type)}${def}${desc}`);
|
|
117
168
|
}
|
|
@@ -119,8 +170,7 @@ export class SchemaIndex {
|
|
|
119
170
|
if (type.enumValues && type.enumValues.length > 0) {
|
|
120
171
|
lines.push("\n## Enum Values\n");
|
|
121
172
|
for (const val of type.enumValues) {
|
|
122
|
-
|
|
123
|
-
lines.push(`- ${val.name}${desc}`);
|
|
173
|
+
lines.push(`- ${val.name}${describe(val.description)}`);
|
|
124
174
|
}
|
|
125
175
|
}
|
|
126
176
|
if (type.possibleTypes && type.possibleTypes.length > 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-index.js","sourceRoot":"","sources":["../../src/graphql/schema-index.ts"],"names":[],"mappings":"AAOA,MAAM,OAAO,WAAW;IACd,OAAO,GAAkC,IAAI,GAAG,EAAE,CAAC;IACnD,WAAW,GAAmC,IAAI,GAAG,EAAE,CAAC;IACxD,cAAc,GAAmC,IAAI,GAAG,EAAE,CAAC;IAC3D,QAAQ,GAAa,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"schema-index.js","sourceRoot":"","sources":["../../src/graphql/schema-index.ts"],"names":[],"mappings":"AAOA,yFAAyF;AACzF,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAIlC,8EAA8E;AAC9E,SAAS,OAAO,CAAC,WAAmB;IAClC,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC;IAClE,OAAO,QAAQ,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AAC3E,CAAC;AAID;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAuC;IACrE,IAAI,OAAO,GAAgC,IAAI,CAAC;IAChD,OAAO,GAAG,EAAE;QACV,OAAO,KAAK,IAAI,EAAE;aACf,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,WAAW,C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,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,KAAK,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,WAAW;YAAE,KAAK,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;QAC5D,KAAK,CAAC,IAAI,CAAC,kBAAkB,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE/D,IAAI,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACxC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YAC/B,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;gBAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;gBAC5D,MAAM,GAAG,GACP,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,CAAC,CAAC,cAAc,GAAG,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACpE,KAAK,CAAC,IAAI,CACR,KAAK,GAAG,CAAC,IAAI,KAAK,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,EAAE,CAC9D,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -4,36 +4,39 @@ import { parseArgs } from "./utils/cli.js";
|
|
|
4
4
|
import { AuthProvider } from "./auth/provider.js";
|
|
5
5
|
import { GraphQLClient } from "./graphql/client.js";
|
|
6
6
|
import { runIntrospection } from "./graphql/introspection.js";
|
|
7
|
-
import {
|
|
7
|
+
import { lazySchemaIndex } from "./graphql/schema-index.js";
|
|
8
8
|
import { createServer } from "./server.js";
|
|
9
|
+
const message = (err) => (err instanceof Error ? err.message : String(err));
|
|
9
10
|
async function main() {
|
|
10
11
|
const config = parseArgs(process.argv);
|
|
11
|
-
console.error(`Connecting to ${config.store} (API ${config.apiVersion}${config.readOnly ? ", read-only" : ""})...`);
|
|
12
|
-
const
|
|
13
|
-
//
|
|
12
|
+
console.error(`Connecting to ${config.store} (API ${config.apiVersion}, ${config.auth.mode === "access-token" ? "access token" : "client credentials"}${config.readOnly ? ", read-only" : ""})...`);
|
|
13
|
+
const client = new GraphQLClient(new AuthProvider(config), config);
|
|
14
|
+
// A small query that needs no access scopes validates the credentials and store up front
|
|
14
15
|
try {
|
|
15
|
-
await
|
|
16
|
+
const res = await client.execute("{ shop { name } }");
|
|
17
|
+
const shop = res.data?.shop;
|
|
18
|
+
if (!shop) {
|
|
19
|
+
throw new Error(res.errors?.map((e) => e.message).join(", ") || "Shopify returned no shop");
|
|
20
|
+
}
|
|
21
|
+
console.error(`Authenticated with ${shop.name}`);
|
|
16
22
|
}
|
|
17
23
|
catch (err) {
|
|
18
|
-
console.error(`Authentication failed: ${
|
|
24
|
+
console.error(`Authentication failed: ${message(err)}`);
|
|
19
25
|
process.exit(1);
|
|
20
26
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
try {
|
|
27
|
+
// Introspection downloads the whole schema, so it runs after the server is connected
|
|
28
|
+
// instead of delaying the client's handshake
|
|
29
|
+
const loadSchemaIndex = lazySchemaIndex(async () => {
|
|
25
30
|
const schema = await runIntrospection(client);
|
|
26
|
-
schemaIndex = new SchemaIndex(schema);
|
|
27
31
|
console.error(`Schema loaded: ${schema.types.length} types`);
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
const server = createServer(client, schemaIndex, config);
|
|
34
|
-
const transport = new StdioServerTransport();
|
|
35
|
-
await server.connect(transport);
|
|
32
|
+
return schema;
|
|
33
|
+
});
|
|
34
|
+
const server = createServer(client, loadSchemaIndex, config);
|
|
35
|
+
await server.connect(new StdioServerTransport());
|
|
36
36
|
console.error("Shopify GraphQL Admin MCP Server running");
|
|
37
|
+
loadSchemaIndex().catch((err) => {
|
|
38
|
+
console.error(`Schema introspection failed: ${message(err)}. The schema tools will retry when they're next called.`);
|
|
39
|
+
});
|
|
37
40
|
}
|
|
38
41
|
main().catch((err) => {
|
|
39
42
|
console.error("Fatal error:", err);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,MAAM,OAAO,GAAG,CAAC,GAAY,EAAE,EAAE,CAAC,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CA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G,eAAe,CAAC,KAAK,IAAI,EAAE;QACjD,MAAM,MAAM,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAC9C,OAAO,CAAC,KAAK,CAAC,kBAAkB,MAAM,CAAC,KAAK,CAAC,MAAM,QAAQ,CAAC,CAAC;QAC7D,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,MAAM,CAAC,CAAC;IAC7D,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,oBAAoB,EAAE,CAAC,CAAC;IACjD,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAE1D,eAAe,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;QAC9B,OAAO,CAAC,KAAK,CACX,gCAAgC,OAAO,CAAC,GAAG,CAAC,yDAAyD,CACtG,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC;IACnC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
2
|
import type { GraphQLClient } from "./graphql/client.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SchemaIndexLoader } from "./graphql/schema-index.js";
|
|
4
4
|
import { type Config } from "./utils/cli.js";
|
|
5
|
-
export type ServerOptions = Pick<Config, "readOnly"> & Partial<Pick<Config, "toolsets" | "uploadDir" | "allowLiveThemeWrites">>;
|
|
6
|
-
export declare function createServer(client: GraphQLClient,
|
|
5
|
+
export type ServerOptions = Pick<Config, "readOnly"> & Partial<Pick<Config, "toolsets" | "uploadDir" | "allowLiveThemeWrites" | "disableRawGraphql">>;
|
|
6
|
+
export declare function createServer(client: GraphQLClient, loadSchemaIndex: SchemaIndexLoader, options: ServerOptions): McpServer;
|
package/dist/server.js
CHANGED
|
@@ -32,15 +32,27 @@ const toolsetRegistrations = {
|
|
|
32
32
|
themes: registerThemeTools,
|
|
33
33
|
markets: registerMarketTools,
|
|
34
34
|
};
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
// Sent to the MCP client at initialization to orient the model before it picks a tool
|
|
36
|
+
function instructions(options) {
|
|
37
|
+
const lines = [
|
|
38
|
+
"Tools for one Shopify store's Admin GraphQL API. Resources are identified by global IDs such as gid://shopify/Product/123.",
|
|
39
|
+
"List tools page with first and after: pass pageInfo.endCursor as after. Nested lists include pageInfo.hasNextPage, which is true when they hold more items than were returned.",
|
|
40
|
+
];
|
|
41
|
+
lines.push(options.readOnly
|
|
42
|
+
? "The server is read-only, so only tools that read data are available."
|
|
43
|
+
: "Mutations report validation problems as userErrors, and a call that returns userErrors is marked as an error.");
|
|
44
|
+
if (!options.disableRawGraphql) {
|
|
45
|
+
lines.push("For anything the other tools don't cover, use shopify_graphql after checking field and argument names with shopify_schema_search and shopify_schema_details.");
|
|
46
|
+
}
|
|
47
|
+
return lines.join("\n");
|
|
48
|
+
}
|
|
49
|
+
export function createServer(client, loadSchemaIndex, options) {
|
|
50
|
+
const server = new McpServer({ name: "shopify-admin-mcp", version }, { instructions: instructions(options) });
|
|
40
51
|
const registrar = options.readOnly ? readOnlyRegistrar(server) : server;
|
|
41
|
-
//
|
|
42
|
-
|
|
43
|
-
|
|
52
|
+
// Schema search is always available; raw GraphQL unless the server was told to leave it out
|
|
53
|
+
if (!options.disableRawGraphql)
|
|
54
|
+
registerGraphQLProxy(registrar, client, options);
|
|
55
|
+
registerSchemaSearch(registrar, loadSchemaIndex);
|
|
44
56
|
for (const toolset of options.toolsets ?? TOOLSETS) {
|
|
45
57
|
toolsetRegistrations[toolset](registrar, client, options);
|
|
46
58
|
}
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGpE,OAAO,EAAE,QAAQ,EAA6B,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,iBAAiB,EAAsB,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEzD,kFAAkF;AAClF,MAAM,EAAE,OAAO,EAAE,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAwB,CAA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;;;UAKE,EACF,EAAE,UAAU,EAAE,CACf,CAAC;QACF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC,CACF,CAAC;IAEF,MAAM,CAAC,YAAY,CACjB,2BAA2B,EAC3B;QACE,WAAW,EAAE,gEAAgE;QAC7E,WAAW,EAAE;YACX,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;SACpD;QACD,WAAW,EAAE,WAAW;KACzB,EACD,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;QACf,MAAM,MAAM,GAAG,MAAM,MAAM,CAAC,OAAO,CACjC;;;;;UAKE,EACF,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,CAClB,CAAC;QACF,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC;IAC5B,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/tools/customers.js
CHANGED
|
@@ -46,12 +46,15 @@ export function registerCustomerTools(server, client) {
|
|
|
46
46
|
tags note
|
|
47
47
|
addressesV2(first: 10) {
|
|
48
48
|
nodes { address1 address2 city province country zip }
|
|
49
|
+
pageInfo { hasNextPage }
|
|
49
50
|
}
|
|
50
51
|
orders(first: 10) {
|
|
51
52
|
nodes { id name totalPriceSet { shopMoney { amount currencyCode } } createdAt }
|
|
53
|
+
pageInfo { hasNextPage }
|
|
52
54
|
}
|
|
53
55
|
metafields(first: 10) {
|
|
54
56
|
nodes { namespace key value type }
|
|
57
|
+
pageInfo { hasNextPage }
|
|
55
58
|
}
|
|
56
59
|
createdAt updatedAt
|
|
57
60
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.js","sourceRoot":"","sources":["../../src/tools/customers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,SAAS,EACT,KAAK,EACL,QAAQ,EACR,UAAU,GAEX,MAAM,aAAa,CAAC;AAEr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