You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"You can make Shopify Admin API requests directly from your extension using the [query API](/docs/api/admin-extensions/api/standard-api#standardapi-propertydetail-query) or the standard [web fetch API](https://developer.mozilla.org/en-US/docs/Web/API/fetch)!\n\nAny `fetch()` calls from your extension to Shopify's Admin GraphQL API are automatically authenticated by default. These calls are fast too, because Shopify handles requests directly.\n\nDirect API requests use [online access](https://shopify.dev/docs/apps/build/authentication-authorization/access-token-types/online-access-tokens) mode by default. If you want to use [offline access](https://shopify.dev/docs/apps/build/authentication-authorization/access-token-types/offline-access-tokens) mode, you can set the `direct_api_mode` property to `offline` in your [app TOML file](/docs/apps/tools/cli/configuration#admin).\n\nNote: Direct API can't be used to manage storefront access tokens.",
152
-
anchorLink: 'direct-api-access',
153
-
codeblock: {
154
-
title: 'Query Shopify data',
155
-
tabs: [
156
-
{
157
-
code: './examples/direct-api-fetch.jsx',
158
-
language: 'tsx',
159
-
title: 'Fetch Product data',
160
-
},
161
-
{
162
-
code: './examples/direct-api-query.jsx',
163
-
language: 'tsx',
164
-
title: 'Query Product data',
165
-
},
166
-
],
167
-
},
168
-
sectionCard: [
169
-
{
170
-
name: "Direct API can't be used to manage storefront access tokens.",
'Custom protocols make it easier to navigate to common locations, and construct URLs.',
229
-
anchorLink: 'custom-protocols',
230
-
accordionContent: [
231
-
{
232
-
title: 'Shopify Protocol',
233
-
description:
234
-
'Use the `shopify:admin` protocol when you want to construct a URL with a root of the Shopify Admin.',
235
-
codeblock: {
236
-
title: 'shopify:admin',
237
-
tabs: [
238
-
{
239
-
title: 'Link to Product Page',
240
-
language: 'tsx',
241
-
code: './examples/link-to-product-page.jsx',
242
-
},
243
-
{
244
-
title: 'Fetch data',
245
-
language: 'ts',
246
-
code: './examples/fetch-data.js',
247
-
},
248
-
],
249
-
},
250
-
},
251
-
{
252
-
title: 'App Protocol',
253
-
description:
254
-
'Use the `app:` protocol to construct a URL for your app. Shopify will handle constructing the base URL for your app. This works for both embedded and non-embedded apps.',
255
-
codeblock: {
256
-
title: 'app:',
257
-
tabs: [
258
-
{
259
-
title: 'Link to Settings',
260
-
language: 'tsx',
261
-
code: './examples/link-to-settings.jsx',
262
-
},
263
-
],
264
-
},
265
-
},
266
-
{
267
-
title: 'Extension Protocol',
268
-
description:
269
-
'Triggers an action extension from a block extension using the `extension:` protocol. The `extensionTarget` is the target of the action extension. The handle is the handle of the action extension that will be opened.',
270
-
codeblock: {
271
-
title: 'extension:',
272
-
tabs: [
273
-
{
274
-
title: 'Trigger Action Extension from a Block extension',
275
-
language: 'tsx',
276
-
code: './examples/link-to-action.jsx',
277
-
},
278
-
],
279
-
},
280
-
},
281
-
{
282
-
title: 'Relative Urls',
283
-
description:
284
-
'Relative urls are relative to your app and are useful when you want to link to a route within your app. This works for both embedded and non-embedded apps.',
* The badges to display in the first column of the row. These are used to display additional information about the item, such as progress of an action or tone indicating the status of that item.
74
74
*/
75
-
badges?: Badge[];
75
+
badges?: PickerBadge[];
76
76
/**
77
77
* The thumbnail to display at the start of the row. This is used to display an image or icon for the item.
0 commit comments