Skip to content

Commit 8230734

Browse files
committed
updates to sources
1 parent db6687e commit 8230734

File tree

25 files changed

+552
-1402
lines changed

25 files changed

+552
-1402
lines changed

components/shopify/common-app.mjs

Lines changed: 0 additions & 965 deletions
This file was deleted.
Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
const STORE_PLACEHOLDER = "{store_name}";
2-
const BASE_URL = `https://${STORE_PLACEHOLDER}.myshopify.com`;
3-
const VERSION_PATH = "/admin/api/2024-04";
1+
const DEFAULT_LIMIT = 20;
2+
const MAX_LIMIT = 250;
3+
const API_VERSION = "2025-01";
44

5-
const DEFAULT_MAX = 300;
6-
7-
export default {
8-
BASE_URL,
9-
VERSION_PATH,
10-
STORE_PLACEHOLDER,
11-
DEFAULT_MAX,
5+
export {
6+
DEFAULT_LIMIT,
7+
MAX_LIMIT,
8+
API_VERSION,
129
};
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
const CREATE_WEBHOOK = `
2+
mutation webhookSubscriptionCreate(
3+
$topic: WebhookSubscriptionTopic!,
4+
$webhookSubscription: WebhookSubscriptionInput!
5+
) {
6+
webhookSubscriptionCreate(
7+
topic: $topic,
8+
webhookSubscription: $webhookSubscription
9+
) {
10+
webhookSubscription {
11+
id
12+
topic
13+
filter
14+
format
15+
callbackUrl
16+
}
17+
userErrors {
18+
field
19+
message
20+
}
21+
}
22+
}`;
23+
24+
const DELETE_WEBHOOK = `
25+
mutation webhookSubscriptionDelete($id: ID!) {
26+
webhookSubscriptionDelete(id: $id) {
27+
userErrors {
28+
field
29+
message
30+
}
31+
deletedWebhookSubscriptionId
32+
}
33+
}
34+
`;
35+
36+
export default {
37+
CREATE_WEBHOOK,
38+
DELETE_WEBHOOK,
39+
};
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
const GET_BLOG = `
2+
query BlogShow($id: ID!, $first: Int, $after: String, $reverse: Boolean) {
3+
blog(id: $id) {
4+
articles(first: $first, after: $after, reverse: $reverse) {
5+
nodes {
6+
id
7+
title
8+
author {
9+
name
10+
}
11+
blog {
12+
id
13+
}
14+
body
15+
createdAt
16+
updatedAt
17+
isPublished
18+
publishedAt
19+
summary
20+
tags
21+
}
22+
pageInfo {
23+
endCursor
24+
}
25+
}
26+
}
27+
}
28+
`;
29+
30+
const LIST_BLOGS = `
31+
query BlogList($first: Int, $after: String) {
32+
blogs(first: $first, after: $after) {
33+
nodes {
34+
id
35+
title
36+
}
37+
pageInfo {
38+
endCursor
39+
}
40+
}
41+
}
42+
`;
43+
44+
const LIST_PAGES = `
45+
query PageList($first: Int, $after: String, $reverse: Boolean) {
46+
pages(first: $first, after: $after, reverse: $reverse) {
47+
nodes {
48+
id
49+
title
50+
body
51+
bodySummary
52+
createdAt
53+
handle
54+
isPublished
55+
metafields (first: $first) {
56+
nodes {
57+
id
58+
key
59+
namespace
60+
value
61+
}
62+
}
63+
publishedAt
64+
updatedAt
65+
}
66+
pageInfo {
67+
endCursor
68+
}
69+
}
70+
}
71+
`;
72+
73+
const LIST_PRODUCTS = `
74+
query ($first: Int, $after: String, $reverse: Boolean, $sortKey: ProductSortKeys) {
75+
products (first: $first, after: $after, reverse: $reverse, sortKey: $sortKey) {
76+
nodes {
77+
id
78+
title
79+
category {
80+
id
81+
}
82+
collections (first: $first) {
83+
nodes {
84+
id
85+
title
86+
}
87+
}
88+
createdAt
89+
description
90+
handle
91+
metafields (first: $first) {
92+
nodes {
93+
id
94+
key
95+
namespace
96+
value
97+
}
98+
}
99+
onlineStoreUrl
100+
productType
101+
publishedAt
102+
status
103+
tags
104+
totalInventory
105+
updatedAt
106+
variants (first: $first) {
107+
nodes {
108+
id
109+
title
110+
}
111+
}
112+
vendor
113+
} pageInfo {
114+
endCursor
115+
}
116+
}
117+
}
118+
`;
119+
120+
export default {
121+
GET_BLOG,
122+
LIST_BLOGS,
123+
LIST_PAGES,
124+
LIST_PRODUCTS,
125+
};

components/shopify/common/rest-admin.mjs

Lines changed: 0 additions & 172 deletions
This file was deleted.

0 commit comments

Comments
 (0)