Skip to content

Commit a04953f

Browse files
authored
Revert "Feature: Include declarative product metafield"
1 parent c88d0b1 commit a04953f

File tree

4 files changed

+3
-37
lines changed

4 files changed

+3
-37
lines changed

CHANGELOG.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# @shopify/shopify-app-template-react-router
22

3-
## 2025.09.26
4-
5-
- [#54](https://github.com/Shopify/shopify-app-template-react-router/pull/54) Includes a declarative product metafield definition
6-
73
## 2025.08.17
84

95
- [#58](https://github.com/Shopify/shopify-app-template-react-router/pull/58) Update Shopify & React Router dependencies. Use Shopify React Router in graphqlrc, not shopify-api

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ This template comes pre-configured with examples of:
7373
1. Setting up your Shopify app in [/app/shopify.server.ts](https://github.com/Shopify/shopify-app-template-react-router/blob/main/app/shopify.server.ts)
7474
2. Querying data using Graphql. Please see: [/app/routes/app.\_index.tsx](https://github.com/Shopify/shopify-app-template-react-router/blob/main/app/routes/app._index.tsx).
7575
3. Responding to webhooks. Please see [/app/routes/webhooks.tsx](https://github.com/Shopify/shopify-app-template-react-router/blob/main/app/routes/webhooks.app.uninstalled.tsx).
76-
4. Using metafields and declarative metafield definitions. Please see [/app/routes/app.\_index.tsx](https://github.com/Shopify/shopify-app-template-react-router/blob/main/app/routes/app._index.tsx) and [/shopify.app.toml](https://github.com/Shopify/shopify-app-template-react-router/blob/main/shopify.app.toml).
7776

7877
Please read the [documentation for @shopify/shopify-app-react-router](https://shopify.dev/docs/api/shopify-app-react-router) to see what other API's are available.
7978

@@ -156,7 +155,7 @@ This only applies if your app is embedded, which it will be by default.
156155

157156
### Webhooks: shop-specific webhook subscriptions aren't updated
158157

159-
If you are registering webhooks in the `afterAuth` hook, using `shopify.registerWebhooks`, you may find that your subscriptions aren't being updated.
158+
If you are registering webhooks in the `afterAuth` hook, using `shopify.registerWebhooks`, you may find that your subscriptions aren't being updated.
160159

161160
Instead of using the `afterAuth` hook declare app-specific webhooks in the `shopify.app.toml` file. This approach is easier since Shopify will automatically sync changes every time you run `deploy` (e.g: `npm run deploy`). Please read these guides to understand more:
162161

@@ -172,7 +171,7 @@ During normal development, the app won't need to re-authenticate most of the tim
172171

173172
### Webhooks: Admin created webhook failing HMAC validation
174173

175-
Webhooks subscriptions created in the [Shopify admin](https://help.shopify.com/en/manual/orders/notifications/webhooks) will fail HMAC validation. This is because the webhook payload is not signed with your app's secret key.
174+
Webhooks subscriptions created in the [Shopify admin](https://help.shopify.com/en/manual/orders/notifications/webhooks) will fail HMAC validation. This is because the webhook payload is not signed with your app's secret key.
176175

177176
The recommended solution is to use [app-specific webhooks](https://shopify.dev/docs/apps/build/webhooks/subscribe#app-specific-subscriptions) defined in your toml file instead. Test your webhooks by triggering events manually in the Shopify admin(e.g. Updating the product title to trigger a `PRODUCTS_UPDATE`).
178177

app/routes/app._index.tsx

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,13 @@ export const action = async ({ request }: ActionFunctionArgs) => {
3939
}
4040
}
4141
}
42-
demoInfo: metafield(namespace: "$app", key: "demo_info") { jsonValue }
4342
}
4443
}
4544
}`,
4645
{
4746
variables: {
4847
product: {
4948
title: `${color} Snowboard`,
50-
metafields: [
51-
{
52-
namespace: "$app",
53-
key: "demo_info",
54-
value: `Created by React Router Template`,
55-
},
56-
],
5749
},
5850
},
5951
},
@@ -148,12 +140,7 @@ export default function Index() {
148140
>
149141
productCreate
150142
</s-link>{" "}
151-
mutation in our API references. Includes a product <s-link
152-
href="https://shopify.dev/docs/apps/build/custom-data/metafields/manage-metafields"
153-
target="_blank"
154-
>
155-
metafield
156-
</s-link>.
143+
mutation in our API references.
157144
</s-paragraph>
158145
<s-stack direction="inline" gap="base">
159146
<s-button
@@ -227,15 +214,6 @@ export default function Index() {
227214
GraphQL
228215
</s-link>
229216
</s-paragraph>
230-
<s-paragraph>
231-
<s-text>API: </s-text>
232-
<s-link
233-
href="https://shopify.dev/docs/apps/build/custom-data"
234-
target="_blank"
235-
>
236-
Metafields & metaobjects
237-
</s-link>
238-
</s-paragraph>
239217
<s-paragraph>
240218
<s-text>Database: </s-text>
241219
<s-link href="https://www.prisma.io/" target="_blank">

shopify.app.toml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22

33
scopes = "write_products"
44

5-
# Product metafield for tracking demo products created by this template
6-
[product.metafields.app.demo_info]
7-
type = "single_line_text_field"
8-
name = "Demo Source Info"
9-
description = "Tracks products created by the Shopify app template for development"
10-
access.admin = "merchant_read_write"
11-
125
[webhooks]
136
api_version = "2025-07"
147

0 commit comments

Comments
 (0)