<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Fayyaz Ahmed</title>
    <description>The latest articles on DEV Community by Fayyaz Ahmed (@fayyaz_ahmed_59771a838089).</description>
    <link>https://dev.to/fayyaz_ahmed_59771a838089</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4268225%2F734374b3-f4b0-49c8-a1b9-48b8fd9136ff.png</url>
      <title>DEV Community: Fayyaz Ahmed</title>
      <link>https://dev.to/fayyaz_ahmed_59771a838089</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fayyaz_ahmed_59771a838089"/>
    <language>en</language>
    <item>
      <title>Shopify Page API 2026: Pages, Blog Posts &amp; Navigation Menus with GraphQL in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Sat, 28 Nov 2026 10:10:28 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-page-api-2026-pages-blog-posts-navigation-menus-with-graphql-in-your-app-4g4o</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-page-api-2026-pages-blog-posts-navigation-menus-with-graphql-in-your-app-4g4o</guid>
      <description>&lt;p&gt;Shopify page API tutorial (2026): publish online store content from your own Shopify app with the GraphQL Admin API - create pages, add them to a navigation menu without losing dropdowns, create a blog and publish a post, then see all of it on the real storefront. Shopify app development series, episode 11 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/n3-UkT3Es-M" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Scopes write_content + write_online_store_navigation&lt;/li&gt;
&lt;li&gt;pageCreate (published by default!), pageUpdate, pageDelete&lt;/li&gt;
&lt;li&gt;blogCreate + articleCreate (author required)&lt;/li&gt;
&lt;li&gt;menuUpdate replaces the whole menu - keep nested items&lt;/li&gt;
&lt;li&gt;Handles: TAKEN vs -1&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep11" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep11&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify Menu API: menuUpdate Deletes Your Dropdowns (Unless You Do This)
&lt;/h3&gt;

&lt;p&gt;Shopify menu API (2026-10): menuUpdate has no 'add one link' - it replaces the whole menu. Send every existing item with its id, AND the items inside each dropdown, plus your new link. Our header kept its 4-item dropdown and got a new 'Size guide' link on the real storefront.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/HILNyDZ0WVI" rel="noopener noreferrer"&gt;https://youtube.com/shorts/HILNyDZ0WVI&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Article API: Publish a Blog Post from Your App (Author Required)
&lt;/h3&gt;

&lt;p&gt;Shopify article API (2026-10): blogCreate makes the blog, articleCreate publishes the post - title, body, tags and an author. Leave the author out and GraphQL rejects the whole request before Shopify even runs it. The post is live on the storefront seconds later.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/T1-TkrMZsu0" rel="noopener noreferrer"&gt;https://youtube.com/shorts/T1-TkrMZsu0&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Page API: New Pages Go Live by Default (and Handles Clash)
&lt;/h3&gt;

&lt;p&gt;Shopify page API (2026-10): pageCreate without isPublished makes a PUBLISHED page - live on your storefront at once. And a taken handle fails with TAKEN for pages, while menus quietly get handle-1. Tested on a real store.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/kDWkUytkYJ0" rel="noopener noreferrer"&gt;https://youtube.com/shorts/kDWkUytkYJ0&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, your app publishes a page, puts it in the store's menu, and writes a blog post. All live on the real storefront, without breaking the dropdown that was already there. This is the Shopify page API at work.&lt;/p&gt;

&lt;p&gt;A page our app created a minute ago, live on the storefront, with a link in the main menu. This is episode eleven of the Shopify app development series. Last time, files and media.&lt;/p&gt;

&lt;p&gt;Today: pages, blog posts and menus. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pages, blogs, menus (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=37s" rel="noopener noreferrer"&gt;0:37&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Online store content is three things. All three are plain GraphQL Admin API calls. No theme code, no Liquid.&lt;/p&gt;

&lt;p&gt;Pages, like a size guide, a shipping policy, or an about page. Blogs, and the posts inside them. Shopify calls a post an article.&lt;/p&gt;

&lt;p&gt;And menus, the navigation links in the theme's header and footer. Good uses: publish policy pages for a merchant, import a blog from another platform, or add your app's page to the store's menu. Two new scopes: write content for pages and blogs, and write online store navigation for menus.&lt;/p&gt;

&lt;p&gt;As in episode ten, I restarted the dev server and opened the app once, and the new scopes were granted.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a page (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=81s" rel="noopener noreferrer"&gt;1:21&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Here's the new Online store content page. Pages on top, then the menu, then blog posts. A new page is a new file: app.content becomes/app/content.&lt;/p&gt;

&lt;p&gt;One query reads it all: the newest pages, the blogs with their latest posts, and the menus with their items. Pages come back newest first: sortKey updated at, reversed. Menu items can hold items of their own, so the query asks three levels deep, with a fragment to keep it short.&lt;/p&gt;

&lt;p&gt;A title, size guide, and one line of text. Published is ticked. Create page.&lt;/p&gt;

&lt;p&gt;Page created, and it's in the list, with its address, slash pages/size guide. We didn't send a handle, so Shopify made one from the title. You can send your own, and our action passes one along if the form has it.&lt;/p&gt;

&lt;p&gt;The code is page create with a title, the body as HTML, and is published from the checkbox. The body is HTML. Our helper escapes the text and wraps each line in a paragraph, because Shopify stores the body exactly as you send it.&lt;/p&gt;

&lt;p&gt;In my tests, a script tag inside the body came back unchanged. So never pass user input straight into a page. Hide and publish are page update with is published.&lt;/p&gt;

&lt;p&gt;And the trap is coming up in GraphiQL: the default. Every action returns userErrors, and the page shows Shopify's own message in a red toast.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add it to a menu (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=174s" rel="noopener noreferrer"&gt;2:54&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the menu. I pick Custom Menus, the one this theme shows in its header. Home, a Features dropdown with four links inside, Pages, and Track order.&lt;/p&gt;

&lt;p&gt;addToMenu, on the size guide. Added to Custom Menus. The new link is last, type page.&lt;/p&gt;

&lt;p&gt;And Features still has its four links inside. Each item has a type. In this store: front page, catalog, search, page, and plain HTTP links.&lt;/p&gt;

&lt;p&gt;Goes to is the address Shopify works out for each one. A page link stores the page's ID, not its URL. In my tests, when the page's handle changed, the link showed the new address.&lt;/p&gt;

&lt;p&gt;That's not automatic. There's no add one link mutation. Menu update replaces the whole menu with the list you send.&lt;/p&gt;

&lt;p&gt;So the action reads the menu, keeps every item with its ID, and adds the new page link at the end. And the keep helper copies each item's own items too. Forget that line, and the Features dropdown is gone.&lt;/p&gt;

&lt;p&gt;A page link needs the type page and the page's ID. In my tests, a page link without an ID failed with page not found. Remove does the opposite: read the menu, filter out that one item, and send the rest back.&lt;/p&gt;

&lt;p&gt;The buttons know which is which. If the page is already in the chosen menu, it says removeFromMenu. Every store has default menus.&lt;/p&gt;

&lt;p&gt;Mine had three: the main menu, the footer, and the customer account menu. Coming up: the one field article create won't let you skip.&lt;/p&gt;

&lt;h3&gt;
  
  
  A blog and a post (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=272s" rel="noopener noreferrer"&gt;4:32&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Blog posts. Every post lives in a blog, so first I create one: Style notes. Blog created, and it's picked for the post.&lt;/p&gt;

&lt;p&gt;A title, how our tees should fit. Author, text, and two tags. Publish post.&lt;/p&gt;

&lt;p&gt;It's in the list, in Style notes, by Fayyaz, tagged fit and tees. The post's address is/blogs, the blog's handle, then the post's handle. Both handles come from the titles.&lt;/p&gt;

&lt;p&gt;Blog create needs only a title. Article create takes the blog ID, title, body, tags, publish, and an author. Tags arrive as one comma separated text, and the action splits them into a list.&lt;/p&gt;

&lt;p&gt;The author isn't optional. Without it, GraphQL rejects the whole request before Shopify even runs it, so it's not in userErrors. And a blog ID that doesn't exist comes back as must reference an existing blog.&lt;/p&gt;

&lt;p&gt;One more detail. The store has an older blog with a personal post, so our page only lists posts from the blog you pick.&lt;/p&gt;

&lt;h3&gt;
  
  
  On the storefront (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=336s" rel="noopener noreferrer"&gt;5:36&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the proof, on the real storefront. This development store has a password, so I unlocked it in this browser before recording. Slash pages/size guide.&lt;/p&gt;

&lt;p&gt;Our title, our text. And in the header: Home, Features, Pages, Track order, and Size guide. The menu change, live.&lt;/p&gt;

&lt;p&gt;And the blog post, with today's date. The storefront needed no theme change. The theme already shows this menu, and pages and blogs have their own templates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=366s" rel="noopener noreferrer"&gt;6:06&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Last, delete. Back in the app, with Custom Menus picked. Delete the size guide page.&lt;/p&gt;

&lt;p&gt;Page deleted. And look at the menu. The size guide link is gone too.&lt;/p&gt;

&lt;p&gt;Shopify removed it with the page, without a word. Page delete takes only the ID. Before deleting, a careful app checks which menus point at the page and tells the merchant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Two defaults in GraphiQL (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=389s" rel="noopener noreferrer"&gt;6:29&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Two defaults I'd want to know about, in GraphiQL. Page create, a title and a handle, and no is published at all. Is published: true.&lt;/p&gt;

&lt;p&gt;The page went live the moment it was created. If you want a draft, say is published false. Same handle again.&lt;/p&gt;

&lt;p&gt;Handle has already been taken. Pages refuse a duplicate handle. Now menu create, with the handle of a menu that already exists.&lt;/p&gt;

&lt;p&gt;No error. The handle quietly became custom menus dash one. Same API, two different rules.&lt;/p&gt;

&lt;p&gt;For menus, the handle matters. It's how a theme finds the menu it should show. And changing a page's handle can leave a redirect behind.&lt;/p&gt;

&lt;p&gt;Page update with redirect new handle, and the old URL still works.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=437s" rel="noopener noreferrer"&gt;7:17&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: our text box is plain text turned into paragraphs. A real editor would send rich HTML, escaped or sanitised.&lt;/p&gt;

&lt;p&gt;Two: we add links at the top level of a menu. Nesting a link inside a dropdown means adding it to that item's items. Three: this theme's footer has no menu block, which is why I used the header menu.&lt;/p&gt;

&lt;p&gt;Your theme may differ. Want to practise? Add a change handle button.&lt;/p&gt;

&lt;p&gt;Page update with a new handle and redirect new handle, then open the old URL. And everything you saw was tested on my real development store, on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=n3-UkT3Es-M&amp;amp;t=485s" rel="noopener noreferrer"&gt;8:05&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Add the content and navigation scopes. Create pages with page create, and always set is published, because the default is live.&lt;/p&gt;

&lt;p&gt;Create a blog, then posts with article create, and never forget the author. And update menus by sending the whole tree back, nested items included. That's the Shopify page API in 2026, inside a real app, on a real store.&lt;/p&gt;

&lt;p&gt;The full code for this episode is free on GitHub. The link is in the description. Next episode: markets and translations.&lt;/p&gt;

&lt;p&gt;Your store in a second language, from your own app. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-page-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-page-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify File Upload API 2026: Staged Uploads, fileCreate &amp; Product Images in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Sat, 28 Nov 2026 09:33:02 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-file-upload-api-2026-staged-uploads-filecreate-product-images-in-your-app-48pc</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-file-upload-api-2026-staged-uploads-filecreate-product-images-in-your-app-48pc</guid>
      <description>&lt;p&gt;Shopify file upload API tutorial (2026): upload images from your own Shopify app with the GraphQL Admin API - stagedUploadsCreate, POST the file to the staged target, fileCreate, wait for READY, add the image to a product with fileUpdate, remove it and delete it, on a real development store. Shopify app development series, episode 10 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/WPor8ugv-6E" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The write_files scope (and what works without it)&lt;/li&gt;
&lt;li&gt;stagedUploadsCreate → POST → fileCreate&lt;/li&gt;
&lt;li&gt;fileCreate from a public URL&lt;/li&gt;
&lt;li&gt;fileStatus: UPLOADED, READY, FAILED + fileErrors&lt;/li&gt;
&lt;li&gt;Add / remove product images with fileUpdate&lt;/li&gt;
&lt;li&gt;fileDelete&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep10" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep10&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify GraphQL Upload File: The 3 Steps (stagedUploadsCreate + fileCreate)
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL upload file (2026-10): you can't send the bytes to fileCreate. Step 1 stagedUploadsCreate gives a signed URL and form fields, step 2 POST the file there (201), step 3 fileCreate with the resourceUrl - and the image is READY seconds later. Tested on a real store.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/wcaEunoj--0" rel="noopener noreferrer"&gt;https://youtube.com/shorts/wcaEunoj--0&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify File Create Failed? fileStatus, fileErrors &amp;amp; the Real Reason
&lt;/h3&gt;

&lt;p&gt;Shopify file create (2026-10): fileCreate answers right away with status UPLOADED and no errors - the real result comes later. A broken image URL turns FAILED with fileErrors: 'Media processing failed', and the details say the file returned 404. Poll fileStatus until READY or FAILED.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/9BDfR9OCi3Y" rel="noopener noreferrer"&gt;https://youtube.com/shorts/9BDfR9OCi3Y&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Admin API Upload File to a Product: fileUpdate referencesToAdd
&lt;/h3&gt;

&lt;p&gt;Shopify admin API upload file to a product (2026-10): once a file is READY, one fileUpdate with referencesToAdd and the product's ID adds it to the product's media - same image, no copy. referencesToRemove takes it off the product, and the file stays in Files.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/tJlfJbl1nPM" rel="noopener noreferrer"&gt;https://youtube.com/shorts/tJlfJbl1nPM&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, your app uploads an image to Shopify, and puts it on a product. You'll add a photo straight from a URL, and see exactly why a broken one fails. This is the Shopify file upload API at work.&lt;/p&gt;

&lt;p&gt;Our app uploaded this photo, and put it on the product, without opening Shopify's editor. This is episode ten of the Shopify app development series. Last time, webhooks.&lt;/p&gt;

&lt;p&gt;Today: files and media. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Files vs product media (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=33s" rel="noopener noreferrer"&gt;0:33&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, two words that get mixed up: files, and product media. Files is the store's library, under Content, Files in the admin. Every image you upload lands there.&lt;/p&gt;

&lt;p&gt;Merchants find it under Content, Files. Product photos, theme images and documents all live there. Product media is the images on one product.&lt;/p&gt;

&lt;p&gt;Good uses: import product photos from a supplier, upload size charts, or let merchants pick images from your own app. And it's the same image. In my tests, the product's media had the exact same ID as the file.&lt;/p&gt;

&lt;p&gt;So you upload once, then point products at it.&lt;/p&gt;

&lt;h3&gt;
  
  
  The write_files scope (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=73s" rel="noopener noreferrer"&gt;1:13&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;This episode needs one new permission: write files. Before I added it, the files query and file create both came back access denied, and the error named the scopes that would work. Oddly, stagedUploadsCreate worked without it.&lt;/p&gt;

&lt;p&gt;You can get an upload target, but you can't turn it into a file. After changing scopes, I restarted the dev server and opened the app once, and Shopify granted the new scope.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Files page (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=99s" rel="noopener noreferrer"&gt;1:39&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the new Files and media page. Upload from your computer on the left, add from a URL on the right. Below, the latest images in the store, a product picker, and buttons to add, remove or delete.&lt;/p&gt;

&lt;p&gt;A new page is a new file. The route app.files becomes/app/files. The loader asks for the six newest images, with their status, any errors, and the image size.&lt;/p&gt;

&lt;p&gt;Plus ten products with their media count. The query filter media type image skips videos and other files, and sortKey createdAt, reversed, puts the newest first. For each file the loader keeps the ID, the alt text, the status, the image URL and size, and the first error if there is one.&lt;/p&gt;

&lt;p&gt;Each node in that list is a media image here. Generic files and videos come back as other types, so you pick their fields with on.&lt;/p&gt;

&lt;h3&gt;
  
  
  Upload in three steps (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=158s" rel="noopener noreferrer"&gt;2:38&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Here's why uploading takes three steps. Shopify's GraphQL API doesn't take the bytes of a file. You send it somewhere first.&lt;/p&gt;

&lt;p&gt;Step one, stagedUploadsCreate. You tell Shopify the file name, the type, the size, and that it's an image. The file size goes in as a string.&lt;/p&gt;

&lt;p&gt;Big numbers travel through GraphQL as text. Shopify answers with a URL, a resource URL, and a list of parameters. In my test, the URL was a Google Cloud Storage bucket, with signed parameters.&lt;/p&gt;

&lt;p&gt;Step two: post the file there, as a form. Every parameter first, in order, and the file last. The storage answers two oh one, created.&lt;/p&gt;

&lt;p&gt;Nothing exists in the store yet. Step three, file create, with the resource URL as the original source. Now it's a file in the store.&lt;/p&gt;

&lt;p&gt;If the post to storage fails, we stop and show the status code. File create never runs, so nothing half done lands in the store. Alt text is what screen readers say, and what search engines read.&lt;/p&gt;

&lt;p&gt;If you leave it empty, our app uses the file name. In our app the browser sends the file to our own server action, and the server does all three steps. The page just submits a form.&lt;/p&gt;

&lt;p&gt;The choose image button clicks a hidden file input, and the page keeps the picked file, so it can show its name and size.&lt;/p&gt;

&lt;h3&gt;
  
  
  Live: upload (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=243s" rel="noopener noreferrer"&gt;4:03&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Let's do it. Choose image, a size chart for the Everyday Crew Neck Tee, and an alt text. Upload.&lt;/p&gt;

&lt;p&gt;The round trip, our server, the storage, and file create, took about five seconds. It's in the list, processing. And a moment later, ready, twelve hundred by twelve hundred.&lt;/p&gt;

&lt;p&gt;That's because file create answers right away, with status uploaded. Shopify processes the image after that. So the page re-reads the list every second and a half, but only while a file is still uploaded or processing.&lt;/p&gt;

&lt;p&gt;The badge colours follow the status: green when ready, red when failed, blue while it's uploaded or processing. And our page disables add and remove until a file is ready.&lt;/p&gt;

&lt;h3&gt;
  
  
  From a URL (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=290s" rel="noopener noreferrer"&gt;4:50&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;The second way needs no upload at all. Add from a URL: a public photo of a white crew neck tee. Alt text, and add from URL.&lt;/p&gt;

&lt;p&gt;Shopify downloads it for us. Ready, a few seconds later. In the code, it's file create alone, with the URL as the original source.&lt;/p&gt;

&lt;p&gt;No staged upload. Coming up: a URL that file create happily accepts, and that still fails. The file keeps the name from the URL.&lt;/p&gt;

&lt;p&gt;In GraphiQL later, you'll see pexels photo, then the number.&lt;/p&gt;

&lt;h3&gt;
  
  
  When it fails (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=324s" rel="noopener noreferrer"&gt;5:24&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now a URL that doesn't exist. File create still says OK. No userErrors at all.&lt;/p&gt;

&lt;p&gt;Then the status turns failed. And file errors tells us why: the file does not exist, response code four oh four. That's the trap.&lt;/p&gt;

&lt;p&gt;A userErrors check is not enough. Read file status, and file errors, after processing. File errors has a code, a message, and details.&lt;/p&gt;

&lt;p&gt;The message only said media processing failed. The details had the real reason. Some problems do fail right away.&lt;/p&gt;

&lt;p&gt;In GraphiQL, file create with the original source, hello. Image URL is invalid. That's a user error, because Shopify can see it before downloading anything.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add to a product (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=369s" rel="noopener noreferrer"&gt;6:09&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now let's use an image. I pick the Everyday Crew Neck Tee. One image so far.&lt;/p&gt;

&lt;p&gt;Add to product, on the tee photo. Added to the product, and the badge says two images. That's file update, with referencesToAdd, and the product's ID.&lt;/p&gt;

&lt;p&gt;No productUpdate, no copy of the image. The product picker is a normal select, and the badge counts the product's media from the loader. The proof, on Shopify's own product page.&lt;/p&gt;

&lt;p&gt;Media: the original photo, and ours, right next to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Remove and delete (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=409s" rel="noopener noreferrer"&gt;6:49&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Back in the app. Remove does the opposite. Removed from the product.&lt;/p&gt;

&lt;p&gt;One image again. referencesToRemove takes it off the product, but the file stays in Files. In my test, the same file was still there, ready.&lt;/p&gt;

&lt;p&gt;And delete removes the file itself. I delete the failed one. File deleted.&lt;/p&gt;

&lt;p&gt;File delete takes a list of IDs. Run it twice, and the second time says file does not exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read files in GraphiQL (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=440s" rel="noopener noreferrer"&gt;7:20&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;To read files yourself, here's the files query in GraphiQL. The newest three, with alt text, status, and image. Our two images, both ready, on Shopify's CDN.&lt;/p&gt;

&lt;p&gt;One named pexels photo, one named size chart tee.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=456s" rel="noopener noreferrer"&gt;7:36&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: our file goes through our own server. For big files, send it from the browser straight to the staged URL instead.&lt;/p&gt;

&lt;p&gt;Two: the failed upload kept the alt text from the photo before it, because I didn't clear the field. Clear your form after each add. Three: we only handle images.&lt;/p&gt;

&lt;p&gt;Videos and 3D models use the same staged upload idea, with a different resource type. Want to practise? Add an edit alt text button.&lt;/p&gt;

&lt;p&gt;File update takes an alt, and it's good for accessibility and SEO. And everything you saw was tested on my real development store, on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=WPor8ugv-6E&amp;amp;t=505s" rel="noopener noreferrer"&gt;8:25&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Add the write files scope. Upload in three steps: stagedUploadsCreate, post the bytes, file create.&lt;/p&gt;

&lt;p&gt;Or file create alone with a public URL. Wait for ready, and read file errors when it fails. Then put the file on products with file update and referencesToAdd.&lt;/p&gt;

&lt;p&gt;That's the Shopify file upload API in 2026, inside a real app, on a real store. The full code for this episode is free on GitHub. The link is in the description.&lt;/p&gt;

&lt;p&gt;Next episode: online store content. Pages, blog posts and menus, from your own app. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-file-upload-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-file-upload-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify App Webhooks 2026: shopify.app.toml Subscriptions, HMAC, Retries &amp; Price-Change Events</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:07:53 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-app-webhooks-2026-shopifyapptoml-subscriptions-hmac-retries-price-change-events-5928</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-app-webhooks-2026-shopifyapptoml-subscriptions-hmac-retries-price-change-events-5928</guid>
      <description>&lt;p&gt;Shopify app webhooks tutorial (2026): react to store changes from your own Shopify app - subscribe in shopify.app.toml, handle products/create and products/delete in one route, verify the HMAC with authenticate.webhook, save every event with Prisma, survive retries without duplicates, and use the new filtered events that only fire when a price changes, on a real development store. Shopify app development series, episode 9 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ursnox-Pbgs" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;App-specific webhook subscriptions in shopify.app.toml&lt;/li&gt;
&lt;li&gt;authenticate.webhook: HMAC check, topic, payload, eventId&lt;/li&gt;
&lt;li&gt;Save events with Prisma and answer fast&lt;/li&gt;
&lt;li&gt;Retries: same eventId, no duplicates&lt;/li&gt;
&lt;li&gt;[events]: only when a variant price changes, with your own query&lt;/li&gt;
&lt;li&gt;Test with shopify app webhook trigger&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep09" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep09&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify Webhook Events: Only When the Price Changes (New in 2026)
&lt;/h3&gt;

&lt;p&gt;Shopify webhook events (2026-10): the new [events] section in shopify.app.toml fires only when a variant's price changes on an active product - and sends the result of YOUR GraphQL query. Title change: nothing. Price change: one event, seconds later. Tested on a real store.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/4znfoEHRx0E" rel="noopener noreferrer"&gt;https://youtube.com/shorts/4znfoEHRx0E&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Webhooks Retry: My App Failed Once, Shopify Sent It Again
&lt;/h3&gt;

&lt;p&gt;Shopify webhooks retry (2026-10): my handler answered 500 on purpose, and Shopify sent the same event again within seconds - same X-Shopify-Event-Id. Save by eventId and you count deliveries instead of saving duplicates.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/PR96zt2JesU" rel="noopener noreferrer"&gt;https://youtube.com/shorts/PR96zt2JesU&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify App Toml Webhooks: Subscribe Without an API Call
&lt;/h3&gt;

&lt;p&gt;Shopify app toml webhooks (2026-10): three lines in shopify.app.toml subscribe your app to products/create and products/delete on every store that installs it - no webhookSubscriptionCreate call. That's also why the webhookSubscriptions query returns an empty list.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/lZu89oPRc_k" rel="noopener noreferrer"&gt;https://youtube.com/shorts/lZu89oPRc_k&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, your app will hear about every product change in the store, a second after it happens. You'll make it fail on purpose, and watch Shopify send the same event again, and you'll see a fake webhook bounce right off. This is a Shopify app webhook at work.&lt;/p&gt;

&lt;p&gt;I create a product, and a second later, Shopify tells our app about it. This is episode nine of the Shopify app development series. Last time we built size guides with metaobjects.&lt;/p&gt;

&lt;p&gt;Today: webhooks. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  What a webhook is (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=36s" rel="noopener noreferrer"&gt;0:36&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, what a webhook is, and why you want one. Without webhooks, your app has to keep asking Shopify: did anything change? Most of the time the answer is no, and you still pay for the call.&lt;/p&gt;

&lt;p&gt;With a webhook, Shopify tells you once, the moment something happens. Good uses: sync products to another system, clear a cache, send an alert, or clean up when a merchant uninstalls your app. Here's the path.&lt;/p&gt;

&lt;p&gt;Something changes in the store. Shopify sends a signed POST request to a URL in your app. Your app checks the signature, saves what it needs, and answers two hundred, fast.&lt;/p&gt;

&lt;p&gt;If it doesn't, Shopify tries again.&lt;/p&gt;

&lt;h3&gt;
  
  
  Subscribe in shopify.app.toml (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=78s" rel="noopener noreferrer"&gt;1:18&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In 2026, you subscribe in shopify.app.toml. No API call, no setup code. The template already has two: app uninstalled, and scopes update.&lt;/p&gt;

&lt;p&gt;I add one more subscription. One URI, slash webhooks/catalog, and two topics: products create and products delete. When you run shopify app dev, or deploy, the CLI sends these subscriptions to Shopify with the app.&lt;/p&gt;

&lt;p&gt;They belong to your app, on every store that installs it. The URI is a path. Shopify puts your app's URL in front of it, so it follows your tunnel during development.&lt;/p&gt;

&lt;p&gt;The template's app uninstalled handler is a good first example. It deletes the shop's sessions, and it's written to run twice safely. For apps with heavy traffic, a subscription can also point at Google Pub Sub or Amazon EventBridge instead of a URL.&lt;/p&gt;

&lt;h3&gt;
  
  
  The handler: HMAC first (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=135s" rel="noopener noreferrer"&gt;2:15&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the handler. The path/webhooks/catalog means a route file named webhooks.catalog. It only has an action, because Shopify always sends a POST.&lt;/p&gt;

&lt;p&gt;The first line is authenticate.webhook. That one call checks the HMAC signature. Shopify signs every body with your app's secret.&lt;/p&gt;

&lt;p&gt;A request without a valid signature never gets past this line. The signature is in the X Shopify H mac header: a hash of the raw body, made with your app's client secret. That's why the helper reads the raw body itself.&lt;/p&gt;

&lt;p&gt;It gives back the topic, the shop, the payload, and two IDs: the webhook ID, and the event ID. One URL, two topics, so I switch on the topic. Create sends the whole product, so I keep the title and the status.&lt;/p&gt;

&lt;p&gt;Delete sends only the ID. Topics arrive in capitals with underscores, like products underscore create. The create payload is the full product, in the older REST shape: handle, body HTML, variants, and admin graphql api id, the GraphQL ID for follow-up queries.&lt;/p&gt;

&lt;p&gt;On delete, the product is already gone, so the ID is all you get. If you need more, keep your own copy when it's created. Then I answer with an empty response, which means two hundred.&lt;/p&gt;

&lt;p&gt;Shopify waits about five seconds, so slow work belongs in a queue, not here.&lt;/p&gt;

&lt;h3&gt;
  
  
  Save every event (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=221s" rel="noopener noreferrer"&gt;3:41&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Every event is saved in the app's own database, so the page can show it later. The event ID is the primary key, and there's a deliveries counter that starts at one. Why?&lt;/p&gt;

&lt;p&gt;Shopify can deliver the same event more than once. So save event is an upsert by event ID. A new event creates a row.&lt;/p&gt;

&lt;p&gt;The same event again only adds one to deliveries. No duplicate rows, no double work.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Webhooks page (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=247s" rel="noopener noreferrer"&gt;4:07&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;And a new Webhooks page to watch it all. The loader reads the latest twenty events for this shop from our table. Webhooks arrive in the background, so the page re-reads the list every three seconds.&lt;/p&gt;

&lt;p&gt;The table shows the topic, what happened, when Shopify triggered it, when we received it, and the deliveries count. The buttons make real changes in the store, with the GraphQL mutations from earlier episodes. So every webhook you'll see is real.&lt;/p&gt;

&lt;p&gt;One detail from testing. The page keeps the new product's ID and finds it by ID, because product search lags a few seconds behind a brand new product. Here's the page.&lt;/p&gt;

&lt;p&gt;Six buttons that change the store, and an empty list of received events.&lt;/p&gt;

&lt;h3&gt;
  
  
  Live: create and rename (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=290s" rel="noopener noreferrer"&gt;4:50&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Create test product. Products create. It reached our app about a second after the change: Created Webhook test tee, active.&lt;/p&gt;

&lt;p&gt;And a second event too. We'll come back to that one in a moment. Now, change its title.&lt;/p&gt;

&lt;p&gt;The title changed in Shopify, and nothing arrives. We didn't subscribe to product updates, so we don't get them. Two times on every row.&lt;/p&gt;

&lt;p&gt;Triggered is when the change happened in Shopify. Received is when it reached us. Here, under a second apart.&lt;/p&gt;

&lt;h3&gt;
  
  
  Price-change events (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=320s" rel="noopener noreferrer"&gt;5:20&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Here's the new part. Most apps don't care about every update, only about one thing. Like a price.&lt;/p&gt;

&lt;p&gt;The events section of the toml does that. Topic product, action update, and triggers: the variant's price and compareAtPrice. Then your own GraphQL query.&lt;/p&gt;

&lt;p&gt;Shopify runs it and sends you the result, not the whole product. And a query filter: only active products. Change its price.&lt;/p&gt;

&lt;p&gt;One event: Webhook test tee v2, price five. With the new title, because the payload is the result of our query. That second event on create was this one.&lt;/p&gt;

&lt;p&gt;A new product's variant gets its first price, zero, and that counts as a price change. The handler is the same style. authenticate.webhook, then the data from our query: the product and the variant.&lt;/p&gt;

&lt;h3&gt;
  
  
  Retries: fail on purpose (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=373s" rel="noopener noreferrer"&gt;6:13&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the part most tutorials skip: what happens when your app fails. Fail the next delivery. It writes a small flag file.&lt;/p&gt;

&lt;p&gt;The handler sees the flag on a first delivery, deletes it, and answers five hundred. Delete it. Products delete.&lt;/p&gt;

&lt;p&gt;Saved, but we answered five hundred. Deliveries: one. A few seconds later, Shopify sends it again.&lt;/p&gt;

&lt;p&gt;Same event ID, so the same row. Deliveries: two. If your app keeps failing, Shopify keeps trying.&lt;/p&gt;

&lt;p&gt;Its docs say up to eight times over four hours, so a short outage doesn't lose events. That's why the event ID matters. Without the upsert, this product would have been deleted twice in our data.&lt;/p&gt;

&lt;p&gt;So, make your handler safe to run twice. Shopify promises at least one delivery, not exactly one.&lt;/p&gt;

&lt;h3&gt;
  
  
  A fake webhook: 401 (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=422s" rel="noopener noreferrer"&gt;7:02&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Last button. Anyone can find your webhook URL and post to it. Send a fake webhook.&lt;/p&gt;

&lt;p&gt;Refused, four oh one. The headers look real, but the signature isn't, because we don't have Shopify's secret. The fake request sets every Shopify header.&lt;/p&gt;

&lt;p&gt;Only the HMAC is made up, and that's enough to stop it. In my tests, a request without Shopify's headers got four hundred. A GET request too.&lt;/p&gt;

&lt;p&gt;Only a real, signed POST gets through.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where are my subscriptions? (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=454s" rel="noopener noreferrer"&gt;7:34&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;One more thing that confused me at first. In GraphiQL, I ask for the app's webhook subscriptions. An empty list.&lt;/p&gt;

&lt;p&gt;Our toml subscriptions are working, but this query doesn't show them. That query lists subscriptions made with the API, for one store. Toml subscriptions are app specific, so you manage them in the toml, not with this query.&lt;/p&gt;

&lt;p&gt;You'd only use that API when one store needs something different, for example a webhook that depends on a merchant's settings. To test a handler without touching the store, the CLI has shopify app webhook trigger. It sends a signed sample, an example T-shirt.&lt;/p&gt;

&lt;p&gt;In my test it arrived, signed and valid, but for a different shop domain, so our page, which filters by shop, didn't list it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=501s" rel="noopener noreferrer"&gt;8:21&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: the fail button uses a file on disk. Fine for a demo.&lt;/p&gt;

&lt;p&gt;In a real app, never fail on purpose. Two: we do the work inside the request. A real app with slow work should save the event, answer, and process it in a queue.&lt;/p&gt;

&lt;p&gt;Three: webhooks can arrive out of order. Use the triggered at time, not the arrival time, if order matters. Want to practise?&lt;/p&gt;

&lt;p&gt;Subscribe to collections create, and show new collections on the same page. And everything you saw was tested on my real development store, on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=ursnox-Pbgs&amp;amp;t=542s" rel="noopener noreferrer"&gt;9:02&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Subscribe in shopify.app.toml: topics in the webhooks section, and only the changes you need in the events section. Start every handler with authenticate.webhook, so a fake request gets four oh one.&lt;/p&gt;

&lt;p&gt;Save by event ID, because Shopify retries, and the same event can come twice. And answer fast. Slow work goes in a queue.&lt;/p&gt;

&lt;p&gt;That's Shopify app webhooks in 2026, inside a real app, on a real store. The full code for this episode is free on GitHub. The link is in the description.&lt;/p&gt;

&lt;p&gt;Next episode: files and media. Your app uploads images to Shopify, and adds them to products. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-app-webhook-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-webhook-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify Metaobjects API 2026: Definitions, Entries &amp; Product References with GraphQL in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 15:04:08 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-metaobjects-api-2026-definitions-entries-product-references-with-graphql-in-your-app-92i</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-metaobjects-api-2026-definitions-entries-product-references-with-graphql-in-your-app-92i</guid>
      <description>&lt;p&gt;Shopify metaobjects API tutorial (2026): build your own content type inside a Shopify app with the GraphQL Admin API 2026-10 - a size guide with required fields, choices and Draft/Active status, entries you create, edit and delete, and products that point at them with a metaobject reference metafield, on a real development store. Shopify app development series, episode 8 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/mq8sz9tJ19Q" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Metaobject definitions: type, fields, required, choices, displayNameKey, publishable&lt;/li&gt;
&lt;li&gt;metaobjectCreate / Update / Delete / Upsert and the new values input&lt;/li&gt;
&lt;li&gt;Handles (and the random suffix when one is taken)&lt;/li&gt;
&lt;li&gt;Link entries to products: metaobject_reference + metafieldsSet&lt;/li&gt;
&lt;li&gt;Read a product's entry in one query (reference)&lt;/li&gt;
&lt;li&gt;What happens to products when you delete an entry&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep08" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep08&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify GraphQL Metaobject Definition: Fields, Required &amp;amp; Choices
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL metaobject definition (2026-10): one metaobjectDefinitionCreate call makes your own content type - a size guide with a required title, a fit that only accepts Slim, Regular or Relaxed, and a list of sizes. Then Shopify enforces it: "Title can't be blank" and "Value does not exist in provided choices".&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/QNpRRtmH6NQ" rel="noopener noreferrer"&gt;https://youtube.com/shorts/QNpRRtmH6NQ&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify GraphQL Metaobjects: Delete One and Products Lose It (No Warning)
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL metaobjects (2026-10): I deleted a size guide that a product was using. No error, no warning - the product's reference metafield was simply removed. Check referencedBy first; my app shows how many products use each entry.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/DFLq2MQbD6E" rel="noopener noreferrer"&gt;https://youtube.com/shorts/DFLq2MQbD6E&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify GraphQL Get Metaobjects: A Product's Size Guide in One Query
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL get metaobjects (2026-10): link a size guide entry to a product with a metaobject_reference metafield, then read the product, its size guide, its fit and its sizes in one query with reference. Real app, real store.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/AvIBkFfOVtY" rel="noopener noreferrer"&gt;https://youtube.com/shorts/AvIBkFfOVtY&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll build your own content type in Shopify, and link products to it, from inside your own app. Shopify checks every entry against your rules, and one delete quietly changes your products, without a single warning. This is the Shopify metaobjects API at work.&lt;/p&gt;

&lt;p&gt;A size guide, created by our own app, picked right on Shopify's product page. This is episode eight of the Shopify app development series. Last time we added custom fields to products.&lt;/p&gt;

&lt;p&gt;Today: metaobjects. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Metafield vs metaobject (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=38s" rel="noopener noreferrer"&gt;0:38&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, what a metaobject is, and how it's different from a metafield. A metafield is one value on one product. A warranty, a material.&lt;/p&gt;

&lt;p&gt;Ten products with the same size chart would mean ten copies to keep in sync. A metaobject is a record of its own, with many fields. You write the size chart once, as one entry.&lt;/p&gt;

&lt;p&gt;And products point at that entry with a reference metafield. Change the entry, and every product that uses it shows the change. There are three parts.&lt;/p&gt;

&lt;p&gt;The definition is the type: its fields and their rules. An entry is one metaobject of that type, like T-shirts or Hoodies. And the reference is the product metafield that points at one entry.&lt;/p&gt;

&lt;p&gt;Good uses: size charts, FAQs, ingredients, designers, store locations. Anything many products share.&lt;/p&gt;

&lt;h3&gt;
  
  
  The size guides page (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=92s" rel="noopener noreferrer"&gt;1:32&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now our app. A new Size guides page. The type doesn't exist yet, so the page offers a one time setup.&lt;/p&gt;

&lt;p&gt;A new page is a new file. The route file app.metaobjects becomes the URL /app/metaobjects. The menu link is one more line in the app layout.&lt;/p&gt;

&lt;p&gt;On top of the file, three constants. Our type, size guide. The three fits we allow.&lt;/p&gt;

&lt;p&gt;And the product metafield that will point at an entry. No new permission this time. Metaobjects need the two metaobject scopes, and our app already has them.&lt;/p&gt;

&lt;p&gt;Same request path as every episode: the page asks the loader, buttons call the action, and both talk to the Admin API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read: entries and references (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=139s" rel="noopener noreferrer"&gt;2:19&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Reading first. One query asks three things. Does the type exist?&lt;/p&gt;

&lt;p&gt;metaobjectDefinitionByType returns null if it doesn't. Then the entries, with metaobjects of our type. For each one, the handle, the display name, and each field by its key.&lt;/p&gt;

&lt;p&gt;Sizes is a list, so we ask for json value and get a real array. Referenced by tells us which products point at the entry. And the products, each with its size guide metafield.&lt;/p&gt;

&lt;p&gt;Reference gives us the entry itself, not just an ID. The loader turns all that into simple rows. Ready is true when the type exists, and used by counts the products.&lt;/p&gt;

&lt;p&gt;If the type isn't there yet, the page returns only the setup card, with one button.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the type (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=185s" rel="noopener noreferrer"&gt;3:05&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Setup. One click. Size guide type created.&lt;/p&gt;

&lt;p&gt;That one click made two things. First, metaobjectDefinitionCreate: the type, a name, and displayNameKey title, so each entry is named by its title. Storefront public read lets themes and the Storefront API read the entries.&lt;/p&gt;

&lt;p&gt;Publishable enabled gives every entry a draft or active status. Then the fields. Title is required.&lt;/p&gt;

&lt;p&gt;Fit has a choices validation with our three fits. Sizes is a list of text, and notes is multi line. Second, the product metafield.&lt;/p&gt;

&lt;p&gt;Type metaobject reference, pinned, with a validation that it may only point at our size guide type. That validation matters. I tried setting a product ID as the value, and Shopify refused: value require that you select a metaobject.&lt;/p&gt;

&lt;p&gt;And the page now shows an empty entries table, and our products below.&lt;/p&gt;

&lt;h3&gt;
  
  
  The rules, in GraphiQL (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=240s" rel="noopener noreferrer"&gt;4:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Before we add entries, the raw API in GraphiQL. I run the same metaobjectDefinitionCreate again, type size guide. Type has already been taken.&lt;/p&gt;

&lt;p&gt;A type is unique in the store, so setup can only run once. Now a type called Size Chart, with a capital letter and a space. Invalid.&lt;/p&gt;

&lt;p&gt;Only letters, numbers, underscores and dashes are allowed. And types that start with shopify dash dash are reserved for Shopify. Next, metaobject create: an entry with a fit, but no title.&lt;/p&gt;

&lt;p&gt;Title can't be blank. Our required rule, enforced by Shopify. A title, and the fit oversized, which isn't one of our choices.&lt;/p&gt;

&lt;p&gt;Value does not exist in provided choices. Slim, regular and relaxed only. Now the new values input.&lt;/p&gt;

&lt;p&gt;Instead of a list of key and value pairs, one JSON object, and sizes as a real array. GraphiQL underlines it, but the API accepts it. Created.&lt;/p&gt;

&lt;p&gt;Two surprises. The handle is T-shirts with a random suffix, because T-shirts was taken. And the status is draft.&lt;/p&gt;

&lt;p&gt;So a taken handle never fails. Shopify quietly adds a suffix. If your code looks entries up by handle, set the handle yourself.&lt;/p&gt;

&lt;p&gt;And publishable entries start as draft. If you forget the status, nothing shows on the storefront. There's also metaobject upsert, by handle.&lt;/p&gt;

&lt;p&gt;The first call creates the entry, the second call updates it. Handy for imports.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add entries (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=338s" rel="noopener noreferrer"&gt;5:38&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Back in the app. Add size guide opens a form. Title T-shirts, fit regular, sizes S to XL.&lt;/p&gt;

&lt;p&gt;Two lines of notes, and I tick active. Add size guide. Created T-shirts.&lt;/p&gt;

&lt;p&gt;Its handle comes from the title, and it's active. In the action, create sends metaobject create with our type, the fields, and the status from the checkbox. Fields from turns the form into key and value pairs.&lt;/p&gt;

&lt;p&gt;Every value is a string, and the sizes become a JSON array. Status is one line: active when the box is ticked, draft when it isn't. In the run helper, every mutation returns userErrors, and the page shows Shopify's own message in a red toast.&lt;/p&gt;

&lt;p&gt;Hoodies: relaxed, sizes up to double XL, and this time I leave active unticked. Created Hoodies, as a draft. One thing I changed after testing.&lt;/p&gt;

&lt;p&gt;I first sorted this list by name, and the sorted list showed a new entry about five seconds late. Unsorted, it's there right away.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edit an entry (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=403s" rel="noopener noreferrer"&gt;6:43&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Editing works the same way. Edit Hoodies: I add triple XL to the sizes, and tick active. Saved Hoodies.&lt;/p&gt;

&lt;p&gt;Now it's active too. Update sends metaobject update with the entry's ID, the same fields and the status. Fields you leave out keep their value.&lt;/p&gt;

&lt;p&gt;On the page, one modal does both. Editing fills the form from the entry. Adding starts empty.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link products to entries (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=430s" rel="noopener noreferrer"&gt;7:10&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the link. Everyday Crew Neck Tee gets the T-shirts guide. Assign.&lt;/p&gt;

&lt;p&gt;And the Essential Pullover Hoodie gets Hoodies. Both entries now say one product. That count comes from referenced by.&lt;/p&gt;

&lt;p&gt;On the page, the products table shows each product's guide as a badge, straight from the reference's display name. Assigning is the metafields set from episode seven. The value is simply the entry's ID.&lt;/p&gt;

&lt;h3&gt;
  
  
  On Shopify's product page (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=457s" rel="noopener noreferrer"&gt;7:37&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the proof, on Shopify's own product page for the hoodie, down to product metafields. Size guide: Hoodies. Because the metafield is pinned, the merchant sees it here, and can pick a different guide from a list.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read it in one query (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=472s" rel="noopener noreferrer"&gt;7:52&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Reading it back is one query. Product, the size guide metafield, and its reference as a metaobject. The tee's guide: T-shirts, fit regular, and the sizes as a real array.&lt;/p&gt;

&lt;p&gt;All in one request. The other direction: metaobjectByHandle, T-shirts, and referenced by. One product uses it: the Everyday Crew Neck Tee, through specs.size guide.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete: no warning (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=497s" rel="noopener noreferrer"&gt;8:17&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Last, the dangerous one. I delete Hoodies, the entry the hoodie product uses. Size guide deleted.&lt;/p&gt;

&lt;p&gt;No error, no warning, nothing about the product. And the hoodie has no size guide anymore. Shopify removed the product's metafield with the entry.&lt;/p&gt;

&lt;p&gt;So before your app deletes an entry, check referenced by, and warn the merchant how many products will lose it. Deleting the whole type goes further. Metaobject definition delete removes every entry with it.&lt;/p&gt;

&lt;p&gt;And to add a field later, metaobject definition update takes a list of field definitions to create, and the existing entries stay as they are.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=533s" rel="noopener noreferrer"&gt;8:53&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: our page shows twenty five entries and ten demo products. A real app needs paging with the pageInfo cursor.&lt;/p&gt;

&lt;p&gt;Two: the theme side isn't in this video. Storefront access is on, but showing the guide in a theme is a separate job. Three: delete is one click here, with no confirm.&lt;/p&gt;

&lt;p&gt;Fine for a demo, but add a confirm step in a real app. Want to practise? Add an FAQ type with a question and an answer, and link a list of FAQs to a product with a list reference.&lt;/p&gt;

&lt;p&gt;And everything you saw was tested on my real development store, on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=mq8sz9tJ19Q&amp;amp;t=575s" rel="noopener noreferrer"&gt;9:35&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Define your type once, with metaobjectDefinitionCreate: fields, required, choices, and the publishable status. Write entries with metaobject create and update, and set the status, because the default is draft.&lt;/p&gt;

&lt;p&gt;Link products with a metaobject reference metafield, and set it with metafields set. Read with reference from the product, and referenced by from the entry, and check that before you delete. That's the Shopify metaobjects API in 2026, inside a real app, on a real store.&lt;/p&gt;

&lt;p&gt;The full code for this episode is free on GitHub. The link is in the description. Next episode: webhooks.&lt;/p&gt;

&lt;p&gt;Your app hears about changes in the store the moment they happen. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-metaobjects-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-metaobjects-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify Metafields API 2026: Create Definitions &amp; Set Product Metafields with GraphQL in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 12:20:09 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-metafields-api-2026-create-definitions-set-product-metafields-with-graphql-in-your-app-1khh</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-metafields-api-2026-create-definitions-set-product-metafields-with-graphql-in-your-app-1khh</guid>
      <description>&lt;p&gt;Shopify metafields API tutorial (2026): add custom fields to products from your own Shopify app with the GraphQL Admin API 2026-10 - create metafield definitions (types, validation, pinned in the admin, storefront access), set, read and delete product metafields, on a real development store. Shopify app development series, episode 7 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/eEzTrSdMg2g" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Definitions vs values (namespace, key, type)&lt;/li&gt;
&lt;li&gt;metafieldDefinitionCreate / Update / Delete&lt;/li&gt;
&lt;li&gt;metafieldsSet: many values in one call, all or nothing&lt;/li&gt;
&lt;li&gt;Validation errors: 'Value has a maximum of 5', 'Value must be an integer', 'Type can't be blank'&lt;/li&gt;
&lt;li&gt;compareDigest: no more overwriting someone else's change (STALE_OBJECT)&lt;/li&gt;
&lt;li&gt;jsonValue, metafieldsDelete, Polaris web components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep07" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep07&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify metafieldsSet Errors: Type Can't Be Blank &amp;amp; Must Be an Integer
&lt;/h3&gt;

&lt;p&gt;Shopify metafieldsSet (GraphQL 2026-10): three real errors - "Value must be an integer", "Value has a maximum of 400" (the definition's validation) and "Type can't be blank" (no definition, no type) - then the call that works, with typed jsonValue.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/xgX7wE1T0xc" rel="noopener noreferrer"&gt;https://youtube.com/shorts/xgX7wE1T0xc&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Update Metafields API: Stop Overwriting Changes (compareDigest)
&lt;/h3&gt;

&lt;p&gt;Shopify update metafields API (GraphQL 2026-10): someone changes a value while your app's page is open - without a check your save overwrites it. Send compareDigest with metafieldsSet and Shopify refuses the stale save with STALE_OBJECT. Real app, real error.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/jH7thkCd7zg" rel="noopener noreferrer"&gt;https://youtube.com/shorts/jH7thkCd7zg&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify GraphQL Metafield Definition: Custom Fields on the Product Page
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL metafield definition (2026-10): metafieldDefinitionCreate with a type, a validation and pin: true - my app sets the values with metafieldsSet and they show up on Shopify's own product page. Plus the error for a duplicate key.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/fZA1LAJ449I" rel="noopener noreferrer"&gt;https://youtube.com/shorts/fZA1LAJ449I&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll add your own fields to Shopify products, from inside your own app. Shopify checks every value against your rules, and one small field stops your app from overwriting someone else's change. This is the Shopify metafields API at work.&lt;/p&gt;

&lt;p&gt;Material, care guide, warranty and features: four custom fields, set from our own app, right on Shopify's product page. This is episode seven of the Shopify app development series. Products, variants, collections, inventory and discounts are done.&lt;/p&gt;

&lt;p&gt;Today: metafields. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Definitions vs values (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=39s" rel="noopener noreferrer"&gt;0:39&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, what a metafield really is. There are two parts, and mixing them up is the most common mistake. The definition is like a column in a spreadsheet.&lt;/p&gt;

&lt;p&gt;A name, a key, a type and some rules. Every product gets that column. The value is one cell: what this one product has in that column.&lt;/p&gt;

&lt;p&gt;And the owner is what the value belongs to. Today it's products, but variants, customers, orders and collections work the same way. A metafield is found by three things.&lt;/p&gt;

&lt;p&gt;The namespace, which is a group. The key, which is the field's name in code. And the type.&lt;/p&gt;

&lt;p&gt;Together, namespace and key are unique for an owner type. Specs.material on products is one field, and only one. The type decides what's allowed: single line text, multi line text, an integer, a date, a list, a product reference, and many more.&lt;/p&gt;

&lt;h3&gt;
  
  
  The metafields page (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=98s" rel="noopener noreferrer"&gt;1:38&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now our app. A new Metafields page, still empty. On top, our product fields.&lt;/p&gt;

&lt;p&gt;Below, the values of one product. A new page is a new file. The route file app.metafields becomes the URL /app/metafields.&lt;/p&gt;

&lt;p&gt;The menu link is one more line in the app layout. No new permission this time. Product metafields are part of the products scope we already have.&lt;/p&gt;

&lt;p&gt;Our app keeps all its fields in one namespace, specs. This dev store already has thirty seven product definitions from other apps and Shopify itself, so a namespace keeps ours apart. If you leave the namespace out, Shopify uses an app owned namespace, app dash dash and your app's ID.&lt;/p&gt;

&lt;p&gt;Merchants can read those, but only your app can write them. Same request path as every episode: the page asks the loader, buttons call the action, and both talk to the Admin API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read: definitions and values (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=157s" rel="noopener noreferrer"&gt;2:37&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Reading first. One query asks for two things. The definitions, with metafield definitions, filtered by owner type product and our namespace.&lt;/p&gt;

&lt;p&gt;For each one: the key, the name, the type, the validations, whether it's pinned, how many products use it, and storefront access. And the values of one product, with product metafields in the same namespace. Value, json value and compare digest.&lt;/p&gt;

&lt;p&gt;We'll need that last one later. The product select picks which product we edit. It reloads the page with the product ID in the URL, and the loader reads it from there.&lt;/p&gt;

&lt;p&gt;The loader joins them. Every definition becomes a row, and gets this product's value, or null when it's empty. The maximum comes from the validations list, and pinned is simply a pinned position that isn't null.&lt;/p&gt;

&lt;h3&gt;
  
  
  The API in GraphiQL (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=209s" rel="noopener noreferrer"&gt;3:29&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Before the app, the raw API in GraphiQL. metafieldDefinitionCreate: namespace specs, key fabric weight, type number integer. With two validations, minimum one hundred, maximum four hundred, and pin true.&lt;/p&gt;

&lt;p&gt;Created, with its own ID. Now metafields set, on the Classic Oxford Shirt. I send the value one hundred twenty gsm, with the unit.&lt;/p&gt;

&lt;p&gt;Refused. Value must be an integer. The definition's type is checked on every write.&lt;/p&gt;

&lt;p&gt;Now twelve hundred, a typo with one zero too many. Value has a maximum of four hundred. The validation from the definition, enforced by Shopify for every app and every merchant.&lt;/p&gt;

&lt;p&gt;Next, a key called fit that has no definition, and I don't send a type. Type can't be blank. Without a definition, Shopify can't guess the type, so you must send it.&lt;/p&gt;

&lt;p&gt;With a definition, the type is optional. Shopify takes it from the definition, and a different type is refused as inconsistent. Now all three in one call: fabric weight one hundred twenty, fit with its type, and colors, a list, sent as a JSON array.&lt;/p&gt;

&lt;p&gt;Three metafields back. Each one has a compare digest, a fingerprint of the current value. And reading them: product, metafields, namespace specs.&lt;/p&gt;

&lt;p&gt;Value is always a string. Json value gives you the real type: the number one hundred twenty, and a real array of colors.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create definitions (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=306s" rel="noopener noreferrer"&gt;5:06&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Back in the app. Add field opens a form: a name, a key, and a type. Material, key material, single line text.&lt;/p&gt;

&lt;p&gt;Show on the product page is already checked, and I tick themes can read it. Created. Admin and storefront badges.&lt;/p&gt;

&lt;p&gt;In the action, create definition sends namespace, key, name, owner type product, the type, and the validations. Pin true shows the field on Shopify's product page. Storefront public read makes it readable on the storefront through the Storefront API.&lt;/p&gt;

&lt;p&gt;The default is none. On the page, the modal has the name, the key and the type. The type select only shows when you create, because a type can't change later.&lt;/p&gt;

&lt;p&gt;Care guide, with multi line text. Created. Warranty in years: an integer, with a maximum of five.&lt;/p&gt;

&lt;p&gt;Created, and the type column says integer, zero to five. The maximum becomes two validations, min zero and max five. Validations are name and value pairs, always as strings.&lt;/p&gt;

&lt;p&gt;And features, a list of text. Four fields, and every product in the store now has them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Keys are unique (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=379s" rel="noopener noreferrer"&gt;6:19&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A mistake on purpose: another field with the same key, material. Key is in use for product metafields on the specs namespace. One key per namespace and owner type.&lt;/p&gt;

&lt;p&gt;Keys have rules too. A key with a space and an exclamation mark, like Care Guide, is refused: invalid character. In the action, every mutation returns userErrors, and the page shows Shopify's own message in a red toast.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set values: metafieldsSet (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=406s" rel="noopener noreferrer"&gt;6:46&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the values, for the Canvas Weekender Bag. Material: waxed cotton canvas. The care guide gets two lines.&lt;/p&gt;

&lt;p&gt;The warranty: nine years, on purpose. And three features, separated by commas. Save values.&lt;/p&gt;

&lt;p&gt;Value has a maximum of five. Our rule, checked by Shopify, not by our page. And nothing was saved, not even the material.&lt;/p&gt;

&lt;p&gt;Metafields set is all or nothing: one bad value refuses the whole call. Two years, save. Values saved, and every field now shows one product.&lt;/p&gt;

&lt;p&gt;Saving is one mutation for every field: metafields set. It creates a value if there's none, and updates it if there is. On the page, every field gets the right input.&lt;/p&gt;

&lt;p&gt;A text area for multi line text, a number field for integers, and a text field for the rest. The action builds one input per filled field: owner ID, namespace, key and value. No type needed, because our definitions exist.&lt;/p&gt;

&lt;p&gt;Values are strings. A list must be JSON, so to value splits the commas into a JSON array. Plain text with commas is refused as invalid JSON.&lt;/p&gt;

&lt;h3&gt;
  
  
  On Shopify's product page (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=486s" rel="noopener noreferrer"&gt;8:06&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the real proof. Shopify's own product page for the weekender bag, down to product metafields. Features as three chips, warranty two, the care guide on two lines, and material.&lt;/p&gt;

&lt;p&gt;Our definitions are pinned, so they show right here, and the merchant can edit them.&lt;/p&gt;

&lt;h3&gt;
  
  
  compareDigest: no lost updates (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=503s" rel="noopener noreferrer"&gt;8:23&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now a problem every real app has. Someone changes the material in the admin, while our page is still open with the old value. I type organic cotton canvas, and save.&lt;/p&gt;

&lt;p&gt;Refused. The resource has been updated since it was loaded. Try again with an updated compare digest.&lt;/p&gt;

&lt;p&gt;After a reload, the page shows the admin's change. Nothing was lost. That's compare digest.&lt;/p&gt;

&lt;p&gt;The loader reads each value's digest, the page sends it back, and Shopify only saves if the value is still the same. On the page, saving sends each field's key, type and digest along with the form, as one JSON list. For an empty field we send null.&lt;/p&gt;

&lt;p&gt;That means: create it only if it still doesn't exist. Without compare digest, the last save simply wins, and the merchant's change is gone without a word.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edit, remove, delete (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=556s" rel="noopener noreferrer"&gt;9:16&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Editing a definition. Warranty in years becomes just warranty, with a maximum of ten. Saved.&lt;/p&gt;

&lt;p&gt;Integer, zero to ten. Update finds the definition by namespace, key and owner type. You can change the name and the rules, but not the type.&lt;/p&gt;

&lt;p&gt;The update input simply has no type field. To change a type, you create a new definition and move the data. Remove deletes one value: the care guide of this product.&lt;/p&gt;

&lt;p&gt;The definition stays, and the count drops to zero. That's metafields delete, with owner ID, namespace and key. Deleting a value that isn't there returns null, not an error.&lt;/p&gt;

&lt;p&gt;And delete removes the features field from every product. Field deleted. Watch this flag: deleteAllAssociatedMetafields.&lt;/p&gt;

&lt;p&gt;I tested it set to false: the definition goes, but every value stays behind, orphaned.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=616s" rel="noopener noreferrer"&gt;10:16&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: the values form covers four text and number types. Dates, references, colours and files need their own inputs.&lt;/p&gt;

&lt;p&gt;Two: metafields are not for secrets. Values are plain text to any app with product access, and storefront access makes them public. Three: I tried searching products by a metafield value from the Admin API, and got nothing back, so I'm not showing that here.&lt;/p&gt;

&lt;p&gt;Want to practise? Add a date field, like a launch date, or show the material on the storefront with Liquid: product.metafields.specs.material. And everything you saw was tested on my real development store, on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=eEzTrSdMg2g&amp;amp;t=664s" rel="noopener noreferrer"&gt;11:04&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Define your fields once, with metafieldDefinitionCreate: namespace, key, type, rules and pin. Write values with metafields set, many at once, all or nothing, and send compare digest so you never overwrite someone else.&lt;/p&gt;

&lt;p&gt;Read them with product metafields, and use json value for real numbers and lists. And clean up with metafields delete, or delete the definition with its values. That's the Shopify metafields API in 2026, inside a real app, on a real store.&lt;/p&gt;

&lt;p&gt;The full code for this episode is free on GitHub. The link is in the description. Next episode: metaobjects.&lt;/p&gt;

&lt;p&gt;Your own content types, like size charts or FAQs, with entries you can reuse. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-metafields-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-metafields-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify Update Inventory API 2026: Adjust, Set &amp; Move Stock with GraphQL in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 09:23:33 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-update-inventory-api-2026-adjust-set-move-stock-with-graphql-in-your-app-33pd</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-update-inventory-api-2026-adjust-set-move-stock-with-graphql-in-your-app-33pd</guid>
      <description>&lt;p&gt;Shopify update inventory API tutorial (2026): build a real inventory manager inside your Shopify app with the GraphQL Admin API 2026-10 - read inventory levels per location, adjust and set stock, move stock between locations, and add, rename, deactivate and delete locations, on a real development store. Shopify app development series, episode 5 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/ZkGAlMaqbyE" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Inventory items, levels and named quantities (available, committed, on_hand, incoming)&lt;/li&gt;
&lt;li&gt;inventoryAdjustQuantities + inventorySetQuantities&lt;/li&gt;
&lt;li&gt;Why @idempotent and changeFromQuantity are now required (real errors shown)&lt;/li&gt;
&lt;li&gt;CHANGE_FROM_QUANTITY_STALE: why a repeated request can't change stock twice&lt;/li&gt;
&lt;li&gt;Move stock between locations in one call&lt;/li&gt;
&lt;li&gt;locationAdd, locationEdit, locationDeactivate (destinationLocationId), locationDelete&lt;/li&gt;
&lt;li&gt;Polaris web components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep05" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep05&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify Inventory API 2026: @idempotent Is Now Required
&lt;/h3&gt;

&lt;p&gt;Shopify inventory API GraphQL (2026-10): inventoryAdjustQuantities now needs the @idempotent directive with a key AND changeFromQuantity. Without them Shopify refuses the request - real errors shown, then the working call.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/dvmn80-X5zQ" rel="noopener noreferrer"&gt;https://youtube.com/shorts/dvmn80-X5zQ&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify GraphQL Inventory Set Quantities: Why My Retry Was Refused
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL inventory set quantities (2026-10): set the counted stock with inventorySetQuantities and changeFromQuantity. I sent the same request twice - the second was refused as CHANGE_FROM_QUANTITY_STALE, so the stock never changed twice.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/KalP3U6xI3Q" rel="noopener noreferrer"&gt;https://youtube.com/shorts/KalP3U6xI3Q&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Locations API: Move Stock Between Locations in One Call
&lt;/h3&gt;

&lt;p&gt;Shopify locations API (GraphQL 2026-10): add a location, move stock into it with ONE inventoryAdjustQuantities call (minus here, plus there), then deactivate it with destinationLocationId so the stock comes home.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/_E5GRdPkRJc" rel="noopener noreferrer"&gt;https://youtube.com/shorts/_E5GRdPkRJc&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll change real stock from inside your own Shopify app. Add units, open a new warehouse and move stock into it, and see why Shopify now refuses inventory calls that worked last year. This is the Shopify update inventory API, running inside our own app.&lt;/p&gt;

&lt;p&gt;Ten units received, and the stock went from five to fifteen. This is episode five of the Shopify app development series. Products, variants and collections are done.&lt;/p&gt;

&lt;p&gt;Today: stock, and the places it lives. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Shopify stores stock (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=36s" rel="noopener noreferrer"&gt;0:36&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, how Shopify stores stock. It's not a number on the product. Every variant has one inventory item.&lt;/p&gt;

&lt;p&gt;That's the thing you count. Stock sits at a location: your shop, a warehouse, a pop-up store. And one item at one location is an inventory level.&lt;/p&gt;

&lt;p&gt;That's where the numbers are. A level has named quantities. The four you'll use most: Available is what customers can still buy.&lt;/p&gt;

&lt;p&gt;Committed is already promised to orders that aren't fulfilled yet. On hand is what's physically on the shelf, and incoming is on its way to you. There are more names, like reserved, damaged and safety stock.&lt;/p&gt;

&lt;p&gt;Today we stick to available. When you add stock to available, Shopify moves on hand with it. You'll see both change in the real response later.&lt;/p&gt;

&lt;h3&gt;
  
  
  The inventory page (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=90s" rel="noopener noreferrer"&gt;1:30&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now our app. There's a new Inventory page: the stock at one location, with adjust, set and move on every row. A new page is a new file.&lt;/p&gt;

&lt;p&gt;The route file app.inventory becomes the URL /app/inventory. And the menu link is one line in the app layout. This episode needs two new permissions: write inventory and write locations, in shopify.app.toml.&lt;/p&gt;

&lt;p&gt;A write scope includes reading, so the app can also read stock and locations with these two. A real gotcha: my running dev server didn't pick up the new scopes. I had to restart it, then open the app once to accept them.&lt;/p&gt;

&lt;p&gt;Every request takes the same path as before: the page asks the loader, buttons call the action, both talk to the Admin API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read: locations and levels (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=139s" rel="noopener noreferrer"&gt;2:19&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Reading comes first. The locations query lists every location, active or not. Then the stock query.&lt;/p&gt;

&lt;p&gt;For each variant: its inventory item, and the level at the location we're looking at. The quantities field takes the names you want: available, on hand and committed. If an item isn't stocked at that location, the level is simply null.&lt;/p&gt;

&lt;p&gt;The page shows not stocked. And the list of quantities becomes a small object, name to number, so the table can just say available, on hand, committed. And the loader picks the location from the URL.&lt;/p&gt;

&lt;p&gt;Without one, it takes the oldest active location, your main shop. That line is a real fix. At first I sorted by name, and a new warehouse called Austin quietly became the default page.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 2026 rules (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=188s" rel="noopener noreferrer"&gt;3:08&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Before we change anything, here's the same read in GraphiQL, so you see Shopify's real response. The weekender bag at the shop location: five available, nothing committed, five on hand, nothing incoming. Now the old way to add stock: inventoryAdjustQuantities, with only the input.&lt;/p&gt;

&lt;p&gt;Like most tutorials still show it. Refused. The idempotent directive is required for this mutation but was not provided.&lt;/p&gt;

&lt;p&gt;So we add @idempotent with a key. A key is a unique name for this one change. And we must send changeFromQuantity: the number we think is there now.&lt;/p&gt;

&lt;p&gt;I pretend we saw three, but the real number is five. Shopify refuses: changeFromQuantity stale. That's the point.&lt;/p&gt;

&lt;p&gt;If someone sold a bag since you loaded the page, your change would be based on old numbers. Shopify stops it instead of guessing. With the right number, five, and a new key, plus ten received.&lt;/p&gt;

&lt;p&gt;It works. Two changes: available plus ten, and on hand plus ten. Exactly the rule from the start.&lt;/p&gt;

&lt;p&gt;And if you forget changeFromQuantity completely, it's refused too. I tested it: the input must include it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Adjust stock (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=264s" rel="noopener noreferrer"&gt;4:24&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Back in the app, that's the adjust button. The bag has five. I type ten, and the reason is received.&lt;/p&gt;

&lt;p&gt;Adjust. The toast says adjusted by ten, and the row now shows fifteen available and fifteen on hand. Here's the mutation in our file.&lt;/p&gt;

&lt;p&gt;Notice the key variable, and the @idempotent directive right after the input. In the action, every request gets a brand new key from crypto.random UUID. Why new?&lt;/p&gt;

&lt;p&gt;I tested reusing a key with different numbers. Shopify answers: idempotency key parameter mismatch. The adjust case sends the delta, the reason, and changeFromQuantity: the available number the page showed.&lt;/p&gt;

&lt;p&gt;Each change also carries a referenceDocumentUri: a link to whatever caused it, like an order or a stock count. Ours is an app ID with the key. Reasons are fixed words like received, correction, damaged or shrinkage.&lt;/p&gt;

&lt;p&gt;They show up in Shopify's inventory history. On the page, the adjust form is a Polaris modal: a number field for the change, and a select for the reason. After every save, a toast, and the modals close.&lt;/p&gt;

&lt;p&gt;React Router runs the loader again by itself, so the numbers are always fresh. And when Shopify refuses, like a stale quantity, the toast shows Shopify's own message in red. The user knows the stock changed underneath them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Set after a count (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=353s" rel="noopener noreferrer"&gt;5:53&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Adjust is for changes. Set is for counts. The bomber jacket says nine, but I counted seven on the shelf.&lt;/p&gt;

&lt;p&gt;Save, and it's seven. I didn't calculate minus two. I sent the number I counted.&lt;/p&gt;

&lt;p&gt;That's inventorySetQuantities. Same rules: a key, and changeFromQuantity. The input has quantities instead of changes: the new number, and the number we saw before.&lt;/p&gt;

&lt;p&gt;In GraphiQL, I set the bag back to five, from fifteen. Shopify works out the difference for us: minus ten, on both available and on hand. Now the interesting part.&lt;/p&gt;

&lt;p&gt;I send the exact same request again, same key, same input. Like a network retry. Refused as stale.&lt;/p&gt;

&lt;p&gt;The bag isn't fifteen anymore, so the second request can't change the stock again. And reading it again: five. One change, not two.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add a location (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=412s" rel="noopener noreferrer"&gt;6:52&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Next, locations. Add location opens a form. Austin Warehouse, five hundred Congress Avenue, Austin, and the country code.&lt;/p&gt;

&lt;p&gt;Add, and the toast says added Austin Warehouse. Down in the locations table: the shop location and Austin, both active. That's locationAdd: a name, an address, and whether it fulfillsOnlineOrders.&lt;/p&gt;

&lt;p&gt;The action fills the address from the form. Address, city, postal code and country code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Move stock between locations (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=444s" rel="noopener noreferrer"&gt;7:24&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now move six bags to Austin. Move, pick the location, six units. Moved six.&lt;/p&gt;

&lt;p&gt;Fifteen minus six: nine left at the shop. The move form only offers the other active locations, and the units field stops at what's available here. A move is one adjust call with two changes: minus six here, plus six there.&lt;/p&gt;

&lt;p&gt;One request, one entry in the inventory history. And the plus side needs its own changeFromQuantity, so the action reads the destination level first. Not stocked there yet counts as zero.&lt;/p&gt;

&lt;p&gt;I tested it: you can move stock to a location that has never held the item. Shopify starts stocking it there by itself. Switch the page to Austin Warehouse.&lt;/p&gt;

&lt;p&gt;Only the bag is stocked here: six. Everything else says not stocked. The location picker just changes the URL to question mark location equals the ID.&lt;/p&gt;

&lt;p&gt;Same change event hook as in episode four. Stock here starts tracking an item at this location. The beanie now shows zero, with adjust, set and move.&lt;/p&gt;

&lt;p&gt;That's inventoryActivate, and yes, it needs a key as well. In the table, a stocked row gets the three buttons. A row with no level gets stock here.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rename, deactivate, delete (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=526s" rel="noopener noreferrer"&gt;8:46&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Last, the location's life cycle. Rename opens the same form with just the name. Austin Pop-up.&lt;/p&gt;

&lt;p&gt;Saved. Deactivate. And look what happens to the page.&lt;/p&gt;

&lt;p&gt;It's back on the shop location, and the bag shows fifteen again. The six bags came home. That's because the action sends a destination location.&lt;/p&gt;

&lt;p&gt;Shopify moves the stock there before it deactivates. Without a destination, I tested it: the location deactivates, but the stock stays behind, and you can't delete it anymore. Delete is only possible now, on an inactive, empty location.&lt;/p&gt;

&lt;p&gt;Gone. Shopify's errors explain the rules: location is active, or location has inventory.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=572s" rel="noopener noreferrer"&gt;9:32&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: I load twelve variants. A real store needs pagination, like the products page in episode two.&lt;/p&gt;

&lt;p&gt;Two: these mutations only work for tracked items. Untracked items have no quantities to change. Three: moving stock between real warehouses with shipping and receiving is a different API, inventory transfers.&lt;/p&gt;

&lt;p&gt;This is the quick version. Want to practise? Add a damaged button that moves units from available to damaged with inventoryMoveQuantities, or show every location side by side.&lt;/p&gt;

&lt;p&gt;And everything you saw was tested on my real development store on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=ZkGAlMaqbyE&amp;amp;t=617s" rel="noopener noreferrer"&gt;10:17&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Read stock as inventory levels: an item at a location, with named quantities. Change it with inventoryAdjustQuantities or inventorySetQuantities.&lt;/p&gt;

&lt;p&gt;Always with a key, and changeFromQuantity. And manage locations with add, edit, deactivate with a destination, and delete. That's the Shopify update inventory API in 2026, inside a real app, on a real store.&lt;/p&gt;

&lt;p&gt;The full code for this episode is free on GitHub. The link is in the description. Next episode: discounts.&lt;/p&gt;

&lt;p&gt;Codes, automatic discounts, and buy X get Y. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-update-inventory-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-update-inventory-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify GraphQL Create Collection 2026: Smart &amp; Manual Collections API in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 08:43:32 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-graphql-create-collection-2026-smart-manual-collections-api-in-your-app-1hl1</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-graphql-create-collection-2026-smart-manual-collections-api-in-your-app-1hl1</guid>
      <description>&lt;p&gt;Shopify GraphQL create collection tutorial (2026): build a real collections manager inside your Shopify app with the GraphQL Admin API 2026-10 - manual and smart collections, the new sources model (conditions, hand-picked products, exclusions), Shopify's product picker, rename and delete, on a real development store. Shopify app development series, episode 4 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/zE8Mrt3uh8s" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Manual vs smart collections&lt;/li&gt;
&lt;li&gt;collectionCreate with sources (2026-10)&lt;/li&gt;
&lt;li&gt;collectionUpdate: selectionsToAdd, selectionsToRemove, exclusions, conditionsToCreate&lt;/li&gt;
&lt;li&gt;Why collectionAddProducts is deprecated&lt;/li&gt;
&lt;li&gt;App Bridge resource picker + Polaris web components&lt;/li&gt;
&lt;li&gt;Smart collections update in the background&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep04" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep04&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify Smart Collection API 2026: One Condition, 7 Products
&lt;/h3&gt;

&lt;p&gt;Shopify smart collection API (2026-10): create a collection with one condition - product type is Shirts or Pants - and every matching product joins by itself. Then add a price condition.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/ushsxlmIeCg" rel="noopener noreferrer"&gt;https://youtube.com/shorts/ushsxlmIeCg&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Collections API 2026: collectionAddProducts Is Deprecated
&lt;/h3&gt;

&lt;p&gt;Shopify collections API 2026-10 (GraphQL): collectionAddProducts and collectionRemoveProducts are deprecated. After you create a collection, add and remove products with collectionUpdate and selectionsToAdd / selectionsToRemove instead.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/6KUxJe61aeg" rel="noopener noreferrer"&gt;https://youtube.com/shorts/6KUxJe61aeg&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Collection API GraphQL: Exclude One Product from a Smart Collection
&lt;/h3&gt;

&lt;p&gt;Shopify collection API GraphQL (2026-10): a smart collection can now exclude one product and include a hand-picked one - conditions, selections and exclusions in one source.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/7IEOEy2kaMU" rel="noopener noreferrer"&gt;https://youtube.com/shorts/7IEOEy2kaMU&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll build collections from inside your own Shopify app. Pick products by hand, or let one rule fill the collection by itself, keep one product out, and hand-pick another, all with the brand new collections API in Shopify's 2026-10 version. This is the Shopify GraphQL create collection flow, running inside our own Shopify app.&lt;/p&gt;

&lt;p&gt;One rule, and seven products joined this collection by themselves. This is episode four of the Shopify app development series. Products and variants are done; today we group them into collections.&lt;/p&gt;

&lt;p&gt;The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Manual vs smart (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=41s" rel="noopener noreferrer"&gt;0:41&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, the two kinds of collections. A manual collection is a list you pick yourself, product by product. Like a summer picks page.&lt;/p&gt;

&lt;p&gt;A smart collection has conditions instead. Product type is shirts, or price is over $30. Every product that matches joins on its own, now and later.&lt;/p&gt;

&lt;p&gt;That's why stores love them: add a new shirt next month, and it shows up in the shirts collection without anyone touching it. And in API version 2026-10, Shopify merged the two ideas. One collection can now have conditions, hand-picked products, and exclusions, all at once.&lt;/p&gt;

&lt;h3&gt;
  
  
  What changed in 2026-10 (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=80s" rel="noopener noreferrer"&gt;1:20&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;That's the big change in this version, so let's look at it before any code. A collection now gets its products from sources. A source is simply one way products get in.&lt;/p&gt;

&lt;p&gt;Each source has an inclusion part: the conditions, and the products you picked by hand. And an exclusion part: products that match, but that you keep out on purpose. So the old mutations are on their way out.&lt;/p&gt;

&lt;p&gt;collectionAddProducts and collectionRemoveProducts are marked deprecated, and the schema itself says: use collectionUpdate with selectionsToAdd instead. Even the argument name changed. collectionCreate used to take input.&lt;/p&gt;

&lt;p&gt;Now it takes collection. Most tutorials you'll find still teach the old way. Everything in this video uses the new one, tested on my real store.&lt;/p&gt;

&lt;h3&gt;
  
  
  The collections page (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=133s" rel="noopener noreferrer"&gt;2:13&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now our app. There's a new Collections page in the menu, listing the store's collections with a smart or manual badge. Every request takes the same path as in the last episodes.&lt;/p&gt;

&lt;p&gt;The page asks the loader for data, buttons call the action, and both talk to the Admin GraphQL API on the server. No new permission is needed. The write products scope from episode two covers collections too.&lt;/p&gt;

&lt;p&gt;The menu link is one line in the app layout. And the list is one query: the twenty five most recently updated collections. Each with its title, handle, product count and image.&lt;/p&gt;

&lt;p&gt;And its sources. If a source has conditions, the badge says smart. If not, manual.&lt;/p&gt;

&lt;p&gt;The loader runs that query and also reads the shop's currency. We'll need it for price conditions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a manual collection (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=186s" rel="noopener noreferrer"&gt;3:06&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Let's create a manual collection first. Create collection opens a form. The title is Summer Picks, with a short description, and the type stays on manual.&lt;/p&gt;

&lt;p&gt;Create, and there it is at the top of the list, with zero products. In the app, that's collectionCreate, with the new collection argument. For a manual collection, the action sends only the title and the description.&lt;/p&gt;

&lt;p&gt;No source at all. Why no source? I tested it: an empty source is refused.&lt;/p&gt;

&lt;p&gt;The error says a source must have at least one product selection or condition.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add products: the resource picker (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=224s" rel="noopener noreferrer"&gt;3:44&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;I open Summer Picks. No conditions: this is a manual collection. Add products, and this is Shopify's own product picker, the same one the admin uses.&lt;/p&gt;

&lt;p&gt;I tick the weekender bag, the polo shirt, and the crew neck tee, and click add. Three products, each with a picked badge. They're here because I chose them.&lt;/p&gt;

&lt;p&gt;The toast says saved, three products. That number comes straight back from the mutation. The picker is one call from App Bridge.&lt;/p&gt;

&lt;p&gt;No search page or product list to build yourself. It returns the products you chose, and their IDs go straight to the action. This collection has no source yet, so the first products create one.&lt;/p&gt;

&lt;p&gt;And notice the field names: a new source uses selections, not selectionsToAdd. I learned that one the hard way. My first recording crashed, because I sent selectionsToAdd to a brand new source.&lt;/p&gt;

&lt;p&gt;Shopify said that field doesn't exist there. Now remove. The polo shirt doesn't fit, so I click remove, and we're down to two.&lt;/p&gt;

&lt;p&gt;Every change on this page goes through one mutation: collectionUpdate. The action only decides what to change. Remove is selectionsToRemove, inside inclusion.&lt;/p&gt;

&lt;p&gt;And it's sent as sourcesToUpdate, with the ID of the source.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a smart collection (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=306s" rel="noopener noreferrer"&gt;5:06&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Back to the list for the fun part: a smart collection. Title Shirts and Pants, and this time I choose smart. The form grows a condition row.&lt;/p&gt;

&lt;p&gt;Field product type, condition equals, and the value shirts comma pants. Create. The smart collection API takes it, and the badge says smart.&lt;/p&gt;

&lt;p&gt;I open it. Seven products, and every one says condition. I didn't pick a single one.&lt;/p&gt;

&lt;p&gt;Trail overshirt, cargo pants, chinos, the oxford shirt. All shirts or pants, found by Shopify, not by my code. The type choice is a Polaris choice list.&lt;/p&gt;

&lt;p&gt;Pick smart, and the condition fields appear. The fields come from this small list: product type, vendor, tag, title and price, each with the relations Shopify allows. And one helper turns a form row into a condition.&lt;/p&gt;

&lt;p&gt;Text fields get a list of values. Price gets an amount and the shop's currency. For a smart collection, the action adds one source with that condition.&lt;/p&gt;

&lt;p&gt;One more real bug from recording: the smart option did nothing. React eighteen doesn't pass change events from these web components. The fix is a tiny hook that listens for the change event directly.&lt;/p&gt;

&lt;p&gt;Same trick as the table pagination in episode two.&lt;/p&gt;

&lt;h3&gt;
  
  
  GraphiQL: sources (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=391s" rel="noopener noreferrer"&gt;6:31&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Here's the same smart collection in GraphiQL, so you see Shopify's real response. collectionCreate, and in the variables, one source called rules, with a product type condition: shirts or pants. The response has the source with its condition.&lt;/p&gt;

&lt;p&gt;But look at the product count: zero. That's not a bug. Shopify matches products in the background.&lt;/p&gt;

&lt;p&gt;A few seconds later, I read the collection again, and there are the seven products: shirts and pants, matched by the condition. That's why my pages load the data once more, three seconds after every save. Otherwise you'd see the old count.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conditions, exclusions, picks (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=433s" rel="noopener noreferrer"&gt;7:13&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now let's make the rule stricter. Add condition, field price. Greater than thirty.&lt;/p&gt;

&lt;p&gt;Now a product must be a shirt or pants, and cost more than $30. Six products. The casual everyday shirt was cheaper, so it left by itself.&lt;/p&gt;

&lt;p&gt;The products must match all conditions now. You can switch that to any condition with the match setting at the top. Next, the linen shirt matches, but I don't want it here.&lt;/p&gt;

&lt;p&gt;Exclude, and it moves to its own excluded section. And a smart collection can now take a hand-picked product too. I search the picker for beanie, and add it.&lt;/p&gt;

&lt;p&gt;Here it is. The beanie isn't a shirt or pants, but it's in, marked picked. Conditions and picks, in one collection.&lt;/p&gt;

&lt;p&gt;All three changes are lines in the same changes object. Add condition is conditionsToCreate. Exclude is selectionsToAdd, but inside exclusion.&lt;/p&gt;

&lt;p&gt;And the picker uses selectionsToAdd inside inclusion. On the page, the badge and the button depend on one question: did I pick this product? Picked products get remove.&lt;/p&gt;

&lt;p&gt;Matched ones get exclude. In GraphiQL, it's one collectionUpdate. sourcesToUpdate: the source ID, a price condition, the beanie, and the linen shirt as an exclusion.&lt;/p&gt;

&lt;p&gt;The source now shows both conditions, the beanie as a selection, and the linen shirt in the exclusion. And reading the products again: six. The beanie is in, the linen shirt and the cheap shirt are out.&lt;/p&gt;

&lt;p&gt;Same result as in the app, because the app sends exactly this mutation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Rename and delete (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=534s" rel="noopener noreferrer"&gt;8:54&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Last, the everyday operations. Back on the list, edit opens the same form, without the type choice. I add over $30 to the title and save.&lt;/p&gt;

&lt;p&gt;That's collectionUpdate again, with only the ID, title and description. The sources stay untouched. And Summer Picks can go.&lt;/p&gt;

&lt;p&gt;Delete asks first. The products themselves stay in the store. Gone.&lt;/p&gt;

&lt;p&gt;collectionDelete still takes input with the ID, and returns the deleted ID.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=565s" rel="noopener noreferrer"&gt;9:25&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: collections made by the API are not automatically shown on your sales channels. My app can't even read that yet: it needs the read publications scope, and that's a later episode.&lt;/p&gt;

&lt;p&gt;Two: the old rule set field still exists, but it can't describe the new conditions. After I added the price condition, it simply returned null. Read sources instead.&lt;/p&gt;

&lt;p&gt;Three: I load twenty five collections and fifty products per collection. A big store needs pagination, like the products page in episode two. And as always: a mutation can succeed over HTTP and still refuse your input.&lt;/p&gt;

&lt;p&gt;Read the userErrors. Everything you saw was tested on my real development store, on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=zE8Mrt3uh8s&amp;amp;t=615s" rel="noopener noreferrer"&gt;10:15&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Read collections with their sources. Create them with collectionCreate and the new collection argument.&lt;/p&gt;

&lt;p&gt;Change products, conditions and exclusions with one collectionUpdate and sourcesToUpdate, and delete with collectionDelete. Want to practise? Add a vendor condition, or a button that turns an excluded product back on.&lt;/p&gt;

&lt;p&gt;The include again button is already in the code. That's how you create a collection with the Shopify GraphQL API in 2026, inside a real app, on a real store. The full code for this episode is free on GitHub.&lt;/p&gt;

&lt;p&gt;The link is in the description. Next episode: inventory and locations. Real stock numbers, at real locations.&lt;/p&gt;

&lt;p&gt;See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-graphql-create-collection-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-graphql-create-collection-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify Product Variants API 2026: Add Options, Create, Update &amp; Delete Variants in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 08:03:31 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-product-variants-api-2026-add-options-create-update-delete-variants-in-your-app-35bg</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-product-variants-api-2026-add-options-create-update-delete-variants-in-your-app-35bg</guid>
      <description>&lt;p&gt;Shopify product variants API tutorial (2026): build a real variants editor inside your Shopify app with the GraphQL Admin API - add options like Size and Colour, create every variant, edit prices and SKUs in bulk and delete variants on a real development store. Shopify app development series, episode 3 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/LpRh5aq8WW0" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Options vs variants (and the 'Default Title' variant)&lt;/li&gt;
&lt;li&gt;productOptionsCreate with variantStrategy CREATE&lt;/li&gt;
&lt;li&gt;productVariantsBulkCreate, productVariantsBulkUpdate, productVariantsBulkDelete&lt;/li&gt;
&lt;li&gt;Edit price + SKU for many variants in one call&lt;/li&gt;
&lt;li&gt;userErrors handling + Polaris web components (s-table, s-modal)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep03" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep03&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify GraphQL Create Product with Variants (Sizes x Colours)
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL create product with variants: add Size and Colour options with productOptionsCreate and variantStrategy CREATE - every combination appears in one call.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/0FgXgU6-9L4" rel="noopener noreferrer"&gt;https://youtube.com/shorts/0FgXgU6-9L4&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Product Variants API: Bulk Update Prices &amp;amp; SKUs
&lt;/h3&gt;

&lt;p&gt;Shopify product variants API: update the price and SKU of many variants in one call with productVariantsBulkUpdate.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/AwQprha84gc" rel="noopener noreferrer"&gt;https://youtube.com/shorts/AwQprha84gc&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify productVariantsBulkCreate &amp;amp; Delete: Add or Remove One Variant
&lt;/h3&gt;

&lt;p&gt;Shopify productVariantsBulkCreate and productVariantsBulkDelete: add one new variant to a product, then remove variants - and check userErrors.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/qy4VBIGcjKA" rel="noopener noreferrer"&gt;https://youtube.com/shorts/qy4VBIGcjKA&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll turn one product into every size and colour it comes in, from inside your own Shopify app. Set one price for every variant, and save them all in a single call, add a new size, delete the colour you don't sell, and see every call in GraphiQL first, with Shopify's real responses. This is the Shopify product variants API, running inside our own Shopify app.&lt;/p&gt;

&lt;p&gt;Right now this hoodie has exactly one variant. This is episode three of the Shopify app development series. Episode two built the products page; today every product gets sizes and colours.&lt;/p&gt;

&lt;p&gt;The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  Options vs variants (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=43s" rel="noopener noreferrer"&gt;0:43&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, the two words that confuse everyone: options and variants. An option is a choice the customer makes, like size or colour. Each option has values: small, medium, large.&lt;/p&gt;

&lt;p&gt;Black and grey. And a variant is one combination you actually sell. Three sizes times two colours is six variants, and each one has its own price, SKU and stock.&lt;/p&gt;

&lt;p&gt;Every product has at least one variant. A product with no options still has one, called Default Title. That's the one you saw a second ago.&lt;/p&gt;

&lt;p&gt;So the rule for the whole video: options describe the choices, and variants are the rows you sell. Why does this matter for an app? Because the price, the SKU and the stock all live on the variant, never on the product.&lt;/p&gt;

&lt;h3&gt;
  
  
  The product page (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=91s" rel="noopener noreferrer"&gt;1:31&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now our app. Every request takes the same path as in episode two. The page asks the loader for data, and buttons call the action.&lt;/p&gt;

&lt;p&gt;Both run on the server and talk to the Admin GraphQL API, version 2026-10. No new permission is needed. The write products scope from episode two already covers options and variants.&lt;/p&gt;

&lt;p&gt;On the products page, I search for hoodie. There's our Classic Zip Hoodie, and a new column shows how many variants it has. The product title is now a link to the new page.&lt;/p&gt;

&lt;p&gt;One line in the products route. I click it, and the product page opens inside the admin. The new route file is app.products_.$id.&lt;/p&gt;

&lt;p&gt;The $id is the product number in the URL. And the underscore matters: without it, this page would nest inside the products page layout. With it, it's a page of its own.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read: product query (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=151s" rel="noopener noreferrer"&gt;2:31&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Let's read the product first, and as always, I test every call in GraphiQL before it goes into the app. One product by ID, with its options, and up to ten variants with ID, title, price and SKU. There's the proof: one option called Title, one value Default Title, and one variant at $0.&lt;/p&gt;

&lt;p&gt;And notice the cost at the bottom: a small query like this costs only a few points out of two thousand. In the app, the query lives at the top of the new route. Options give me the name and values for the badges.&lt;/p&gt;

&lt;p&gt;And variants give one row each: title, price, SKU and inventory. The loader turns the number from the URL back into a global ID, runs the query, and returns a not found response if the product doesn't exist.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add options: productOptionsCreate (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=200s" rel="noopener noreferrer"&gt;3:20&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now let's add options. This is how you create a product with variants through the GraphQL API. The option is Size, and the values are S, M and L, separated by commas.&lt;/p&gt;

&lt;p&gt;Add, and the toast says Size added, three variants. Default Title is gone. Then a second option: Color, with black and grey.&lt;/p&gt;

&lt;p&gt;Six variants. Every size in every colour, created in one call. Each new row starts at $0 and no SKU.&lt;/p&gt;

&lt;p&gt;That's why the next step is a bulk edit. Here's that call in GraphiQL. productOptionsCreate, with the product ID, the options, and variantStrategy CREATE.&lt;/p&gt;

&lt;p&gt;The response shows the option with its three values, and three variants: S, M and L, each at $0. Look at the first ID. It's the old Default Title variant, renamed to S.&lt;/p&gt;

&lt;p&gt;Shopify reuses it instead of deleting it. In the app, this is the whole mutation. The key word is CREATE.&lt;/p&gt;

&lt;p&gt;It tells Shopify to make a variant for every new combination. Leave it out, and the default is leave as is: the values are added, but no new variants are made. That surprises a lot of people.&lt;/p&gt;

&lt;p&gt;The action splits the comma list into values, sends one option, and puts the new variant count in the toast. Every branch ends with this little done helper. If Shopify sends userErrors, the page shows them.&lt;/p&gt;

&lt;p&gt;If not, it shows the success message.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bulk edit: productVariantsBulkUpdate (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=294s" rel="noopener noreferrer"&gt;4:54&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now prices. Six variants at $0 is not a shop. I type forty nine into price for all variants and click apply to all.&lt;/p&gt;

&lt;p&gt;Every row now says forty nine, and I give the first two variants a SKU. Nothing is saved yet: it's only on the page. Then save variants.&lt;/p&gt;

&lt;p&gt;One click, one API call, six variants saved. In GraphiQL it's productVariantsBulkUpdate: the product ID, and a list of variants, each with its ID, a price and a SKU. The response gives back every variant with its new price and SKU.&lt;/p&gt;

&lt;p&gt;Three variants, one request. And the same call works for one variant or a hundred, so you never loop over single updates. Here's the mutation in the app.&lt;/p&gt;

&lt;p&gt;Watch the SKU. It isn't a field on the variant input anymore. It goes inside inventory item.&lt;/p&gt;

&lt;p&gt;The action maps every row into that shape: ID, price, and inventory item with the SKU. On the page, apply to all only changes local state. Nothing hits Shopify until you press save, so one save is one call.&lt;/p&gt;

&lt;h3&gt;
  
  
  Add a variant: productVariantsBulkCreate (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=366s" rel="noopener noreferrer"&gt;6:06&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Next, a size we forgot: XL. Add variant opens a form with one field per option. Size XL, colour black, price fifty four, and a SKU.&lt;/p&gt;

&lt;p&gt;Added. Seven variants, and look at the Size option: XL is there now, and I never created it. That's the Shopify GraphQL way: you send option names and values, and Shopify keeps the option list in sync.&lt;/p&gt;

&lt;p&gt;In GraphiQL, productVariantsBulkCreate takes a list of variants. Each one names its optionValues: option name Size, value XL. The new variant comes back with its ID, the price twenty nine, and the SKU.&lt;/p&gt;

&lt;p&gt;In the app, the mutation is the same shape as the update. The action sends one variant: its optionValues, a price, and the SKU inside inventory item. On the page, the form builds those optionValues from the product's own options, so it works for any product.&lt;/p&gt;

&lt;p&gt;And if you send a combination that already exists, Shopify refuses with a user error that the variant already exists. My done helper shows it as an error toast.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete: productVariantsBulkDelete (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=438s" rel="noopener noreferrer"&gt;7:18&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now delete. We don't sell grey after all, so I tick the three grey variants. Delete selected asks first, because this can't be undone.&lt;/p&gt;

&lt;p&gt;Three deleted. And grey has disappeared from the Color option too: a value with no variants is removed. In GraphiQL, productVariantsBulkDelete takes the product ID and a list of variant IDs.&lt;/p&gt;

&lt;p&gt;XL is gone, and the variant count is back to three, with no userErrors. In the app, that's this mutation. The page keeps the ticked IDs in state, and the action sends all of them in one call.&lt;/p&gt;

&lt;p&gt;Last, the whole Color option. Only black is left, so it doesn't add anything. I click the bin next to Color.&lt;/p&gt;

&lt;p&gt;Option deleted, and the variants are simply S, M, L and XL. That's productOptionsDelete with the product ID and the option ID. One catch, tested on my store: with two colours still in use, Shopify refuses.&lt;/p&gt;

&lt;p&gt;The error says cannot delete an option with multiple values.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Polaris page (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=504s" rel="noopener noreferrer"&gt;8:24&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the page itself, built with Polaris web components. Each row has a checkbox for delete, then the price and SKU as real input fields, right inside the table. An honest bug I hit while recording: after adding Size, the option form still held Size, so my second option became Size Color.&lt;/p&gt;

&lt;p&gt;The fix: after every successful save, I bump a form key, and React remounts both forms empty. Then I recorded again. The same effect shows the toast and closes whichever modal is open.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=538s" rel="noopener noreferrer"&gt;8:58&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: my query loads the first hundred variants. That's plenty for most products, but a big catalog needs pagination, like the products page in episode two.&lt;/p&gt;

&lt;p&gt;Two: inventory still says zero. Stock lives on locations, and that's its own episode. Three: every one of these mutations can succeed over HTTP and still refuse your input.&lt;/p&gt;

&lt;p&gt;Always read userErrors. And a bonus: everything you saw was tested on my real development store before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=LpRh5aq8WW0&amp;amp;t=571s" rel="noopener noreferrer"&gt;9:31&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Read options and variants with one product query. Add options with productOptionsCreate and the CREATE strategy.&lt;/p&gt;

&lt;p&gt;Change prices and SKUs in bulk, add single variants with bulk create, and delete with bulk delete. Want to practise? Add a compare at price column, or a button that copies one variant's SKU pattern to every row.&lt;/p&gt;

&lt;p&gt;That's the Shopify product variants API, working inside a real app, on a real store. The full code for this episode is free on GitHub. The link is in the description.&lt;/p&gt;

&lt;p&gt;Next episode: collections. Manual ones, smart ones with rules, and adding products to them. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-product-variants-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-product-variants-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify Admin API Tutorial 2026: Create, Read, Update &amp; Delete Products in Your Shopify App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 07:23:29 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-admin-api-tutorial-2026-create-read-update-delete-products-in-your-shopify-app-47a9</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-admin-api-tutorial-2026-create-read-update-delete-products-in-your-shopify-app-47a9</guid>
      <description>&lt;p&gt;Shopify Admin API tutorial (2026): build a real products manager inside your Shopify app with the GraphQL Admin API - list, search, paginate, create with a price, update and delete products on a real development store. Shopify app development series, episode 2 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/KLpa2syFpjY" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Query products with search + cursor pagination&lt;/li&gt;
&lt;li&gt;productCreate (and why the price goes on the variant)&lt;/li&gt;
&lt;li&gt;productVariantsBulkUpdate to set the price&lt;/li&gt;
&lt;li&gt;productUpdate and productDelete with userErrors handling&lt;/li&gt;
&lt;li&gt;Polaris web components: s-table, s-search-field, s-modal&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep02" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep02&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify GraphQL API Create Product: Why the Price Is Missing
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL API create product with a price.&lt;br&gt;
productCreate makes one default variant - the price goes on that variant with productVariantsBulkUpdate.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/h3TvqCY-esU" rel="noopener noreferrer"&gt;https://youtube.com/shorts/h3TvqCY-esU&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify GraphQL API Get All Products: Search + Cursor Pagination
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL API get all products with search.&lt;br&gt;
Search products and page through them with cursors (pageInfo, endCursor) inside a Shopify app.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/M-soF5eb2q4" rel="noopener noreferrer"&gt;https://youtube.com/shorts/M-soF5eb2q4&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Admin API Tutorial: Update &amp;amp; Delete Products from Your App
&lt;/h3&gt;

&lt;p&gt;Shopify Admin API tutorial: productUpdate and productDelete from a Shopify app - and always check userErrors.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/n9p7NRTx9A0" rel="noopener noreferrer"&gt;https://youtube.com/shorts/n9p7NRTx9A0&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How it works (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll build a real products manager inside your own Shopify app. You'll see the price trap that catches almost every beginner, search your products, and load the next page, with the GraphQL Admin API, and create, edit and delete them, live on a real store. This is a Shopify Admin API tutorial where we build something real: a products manager inside our own Shopify app.&lt;/p&gt;

&lt;p&gt;I type a product, give it a price, and it's created in my store through the GraphQL Admin API. This is episode two of the Shopify app development series. Episode one created this app; today it gets its first real feature.&lt;/p&gt;

&lt;p&gt;First, the big picture, because every feature in this series follows the same path. Our page is built with Polaris web components. When it needs data, it asks the loader.&lt;/p&gt;

&lt;p&gt;When you click save, it calls the action. Both run on the server and talk to the Admin GraphQL API, version 2026-10, with your shop's access token. And the API reads or changes real products in the store.&lt;/p&gt;

&lt;p&gt;Nothing here is mock data. Why GraphQL and not REST? Shopify marked the REST Admin API as legacy in October 2024, and new public apps have to use GraphQL.&lt;/p&gt;

&lt;p&gt;And with GraphQL you ask for exactly the fields you need, in one request, instead of whatever an endpoint decides to send. Before any code runs, the app needs permission. In shopify.app.toml, the scope write products covers reading and changing products.&lt;/p&gt;

&lt;p&gt;Then one line in the app navigation adds the Products page to the admin sidebar. Here's that page. Ten products, newest first, with status, inventory, price and vendor, all from the API.&lt;/p&gt;

&lt;p&gt;Notice the order. The query sorts by updated at, newest first, so anything you create or edit jumps straight to the top. My workflow for every feature in this series: test the query in GraphiQL, then copy it into the app.&lt;/p&gt;

&lt;p&gt;If it works in GraphiQL, it works in the app.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read: query products (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=129s" rel="noopener noreferrer"&gt;2:09&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Let's start with reading products, and I'll show every query in GraphiQL first, so you see exactly what Shopify returns. This is the products query. I ask for five products whose title contains snowboard.&lt;/p&gt;

&lt;p&gt;Shopify returns the two snowboards in my store, with their status and lowest price, plus pageInfo for the next page. GraphiQL here comes with shopify app dev: press g in the terminal and it opens with your app's own scopes and your dev store. And look at the IDs.&lt;/p&gt;

&lt;p&gt;Every Shopify object has a global ID like gid shopify product and a number. That's what every mutation needs. In the app, the same query lives at the top of the products route.&lt;/p&gt;

&lt;p&gt;First or last says how many, after or before are the cursors, and query is the search text. Below that, I list only the fields the table shows. Smaller queries cost less, and Shopify rate limits by cost.&lt;/p&gt;

&lt;p&gt;The loader runs this query on the server every time the page opens. It reads the search text and the cursor from the URL, so search and pages are just links. Search uses title with wildcards on both sides, so snow finds snowboard.&lt;/p&gt;

&lt;p&gt;And the page receives plain data. Here it is in the app. I type snowboard and press enter.&lt;/p&gt;

&lt;p&gt;Two results, the same two GraphiQL gave us. The search box is a Polaris s search field. One honest note: pressing enter inside s search field doesn't submit a normal form, so I listen for the enter key myself.&lt;/p&gt;

&lt;p&gt;Pages work the same way. Next page sends the endCursor, and Shopify gives the next ten. Previous page sends the startCursor.&lt;/p&gt;

&lt;p&gt;No page numbers: Shopify uses cursors so pages stay stable. The table fires next page and previous page events. React eighteen doesn't bind custom events, so I add the listeners directly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create: productCreate (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=249s" rel="noopener noreferrer"&gt;4:09&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now let's create a product. The add product button opens a Polaris modal. Title, description, status, price, vendor, product type and tags.&lt;/p&gt;

&lt;p&gt;Every one of these goes to Shopify. I set the price to twenty four ninety nine. Keep an eye on the price, because there's a trap here.&lt;/p&gt;

&lt;p&gt;Watch it in GraphiQL. productCreate with a title, a status and a vendor. The product exists, but look at the variant: price zero.&lt;/p&gt;

&lt;p&gt;productCreate doesn't take a price at all. While we're here, scroll down. Every response tells you what it cost.&lt;/p&gt;

&lt;p&gt;This mutation cost thirteen points. My app has two thousand points available, and they refill at a hundred per second. Big queries cost more, so ask only for what you show.&lt;/p&gt;

&lt;p&gt;Here's why. Every Shopify product has at least one variant, and the price lives on the variant, not on the product. productCreate makes the product plus one default variant, and I ask for that variant's ID in the response.&lt;/p&gt;

&lt;p&gt;Then a second mutation, productVariantsBulkUpdate, sets the price on that variant. Back in GraphiQL: the product ID, the variant ID, and the price thirty nine. And now the variant costs $39.&lt;/p&gt;

&lt;p&gt;That's the fix. Why bulk update? Because it can change many variants in one call, which matters as soon as a product has sizes and colours.&lt;/p&gt;

&lt;p&gt;In the action, create is three steps. Create the product, and stop if Shopify sends back userErrors. If the form has a price, set it on the first variant with the second mutation.&lt;/p&gt;

&lt;p&gt;And return a message the page shows as a toast. The form fields become the product input here: the description becomes HTML, and tags are split on commas. So when I click create product in the app, both mutations run.&lt;/p&gt;

&lt;p&gt;Created, and the price column says twenty four ninety nine. Real product, real price.&lt;/p&gt;

&lt;h3&gt;
  
  
  Update: productUpdate (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=371s" rel="noopener noreferrer"&gt;6:11&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Updating uses the same modal. Edit fills it with the product's current values. I add navy to the title and switch the status to draft.&lt;/p&gt;

&lt;p&gt;Saved. The title changed, and the badge now says draft. And because the list sorts by updated at, the edited product stays at the top, so you can see your change right away.&lt;/p&gt;

&lt;p&gt;The update mutation is productUpdate. It takes the product ID plus only the fields you want to change. In the action, I reuse the same fields object as create, and add the ID.&lt;/p&gt;

&lt;p&gt;Same rule as before: check userErrors, then return a message. On the page, one submit function sends the form with an intent: create when it's new, update when we're editing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Delete: productDelete (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=417s" rel="noopener noreferrer"&gt;6:57&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Finally, delete. The delete button asks first, because this can't be undone. Confirm, and the toast says product deleted.&lt;/p&gt;

&lt;p&gt;It's gone from the store. In GraphiQL, productDelete takes an input with the product ID. And it returns the deletedProductId, with no userErrors.&lt;/p&gt;

&lt;p&gt;That's our GraphiQL hoodie gone. In the app it's the smallest mutation of all. And the action checks userErrors before it says done.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Polaris page (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=446s" rel="noopener noreferrer"&gt;7:26&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the page itself, because this is what merchants see. The table turns on pagination from the pageInfo, and shows a loading state while a mutation runs. Each product is one row: a thumbnail, a status badge, inventory, price formatted as money, and the edit and delete buttons.&lt;/p&gt;

&lt;p&gt;These are Polaris web components, the new s dash elements. They look exactly like the Shopify admin, so your app feels native. The modal holds the form.&lt;/p&gt;

&lt;p&gt;A key on the form resets it, so edit always shows the right product. And after every mutation, this effect shows a toast and closes the modal, or shows Shopify's own error message.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=487s" rel="noopener noreferrer"&gt;8:07&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Three honest notes before we finish. One: a brand new product can take a few seconds to show up in search, because Shopify's search index lags a little behind. Two: if you add a product while you're on page two, the new product sits on page one, so go back to the first page to see it.&lt;/p&gt;

&lt;p&gt;Three: always read userErrors. A mutation can return success at the HTTP level and still refuse your input. And a bonus: the price field only appears when you create a product.&lt;/p&gt;

&lt;p&gt;Changing prices later belongs to variants, and that's the next episode.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=KLpa2syFpjY&amp;amp;t=523s" rel="noopener noreferrer"&gt;8:43&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Read with the products query, search and cursors. Create with productCreate plus productVariantsBulkUpdate for the price.&lt;/p&gt;

&lt;p&gt;Update with productUpdate, delete with productDelete, and check userErrors every time. Want to practise? Add a filter for status, show the variant count in a new column, or add a duplicate button with productDuplicate.&lt;/p&gt;

&lt;p&gt;The full route is about two hundred eighty lines, and every operation in it was tested on my real development store before I recorded. That's a complete Shopify Admin API tutorial for products, running inside a real app. Next episode, we go one level deeper: variants and options, so one product can come in sizes and colours.&lt;/p&gt;

&lt;p&gt;If you want an app like this built for your store or your business, the link is in the description. See you in the next one.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-admin-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-admin-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to Create a Shopify App in 2026 (Shopify CLI Step by Step for Beginners)</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 06:45:49 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/how-to-create-a-shopify-app-in-2026-shopify-cli-step-by-step-for-beginners-p23</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/how-to-create-a-shopify-app-in-2026-shopify-cli-step-by-step-for-beginners-p23</guid>
      <description>&lt;p&gt;How to create a Shopify app in 2026, step by step with Shopify CLI: install, create the app, run it in a real development store and make your first Admin API call. Shopify app development tutorial for beginners — everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/gFDLhovNQ-E" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install Shopify CLI and check your setup&lt;/li&gt;
&lt;li&gt;Create a new app from the official template&lt;/li&gt;
&lt;li&gt;Run it with shopify app dev in a dev store&lt;/li&gt;
&lt;li&gt;Understand the folder structure&lt;/li&gt;
&lt;li&gt;Make your first real Admin API call&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How to Create a Shopify App in 60 Seconds (Shopify CLI)
&lt;/h3&gt;

&lt;p&gt;How to create a Shopify app in 60 seconds with Shopify CLI — one command, running in a dev store.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/njpPG_n1EJQ" rel="noopener noreferrer"&gt;https://youtube.com/shorts/njpPG_n1EJQ&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify App Folder Structure Explained in 60 Seconds
&lt;/h3&gt;

&lt;p&gt;Shopify app development: the folders in a new Shopify CLI app and which ones you actually edit.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/zAf1DqTH87Q" rel="noopener noreferrer"&gt;https://youtube.com/shorts/zAf1DqTH87Q&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Your First Shopify Admin API Call From a Shopify App
&lt;/h3&gt;

&lt;p&gt;Shopify app development: make your first real Admin API call from a Shopify CLI app.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/6-daprtWDD0" rel="noopener noreferrer"&gt;https://youtube.com/shorts/6-daprtWDD0&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What you need (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;This is a real Shopify app, running inside my store's admin, and I built it in this video from an empty folder. If you've been wondering how to create a Shopify app in 2026, this is the exact path, step by step, with every error I hit along the way. It even talks to Shopify.&lt;/p&gt;

&lt;p&gt;One click, and it creates a real product through the Admin API. That's the result. Now let's build it from zero.&lt;/p&gt;

&lt;p&gt;Everything you'll see is real: real commands, real errors, and a real development store. Nothing is skipped or faked. By the end, you'll have your own app running in your store, and you'll know what every important file does.&lt;/p&gt;

&lt;p&gt;This is a Shopify app development tutorial for beginners, so we start with what you need. First, Node. Type node dash v, and you should see a version number.&lt;/p&gt;

&lt;p&gt;Mine says twenty six. Second, the Shopify CLI. Shopify version prints five point one.&lt;/p&gt;

&lt;p&gt;The CLI is Shopify's command line tool. It creates apps, runs them locally, connects them to your store, and later deploys them. If you don't have it, one npm install command adds it, and the official docs show it for every system.&lt;/p&gt;

&lt;p&gt;And third, a development store, a free test store from your Shopify account, where you can try everything without touching real customers. You also need a Shopify account that can create apps. In 2026 that's done through the Dev Dashboard, and the CLI logs you in the first time you run it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create the app (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=95s" rel="noopener noreferrer"&gt;1:35&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now the main command. Shopify app init creates a new app from Shopify's official template. I add a name, the React Router template, JavaScript, and my organization ID so it skips the account menu.&lt;/p&gt;

&lt;p&gt;Without those flags, the CLI simply asks you. The React Router template is what Shopify recommends for new apps right now. It gives you a full web app with login, a database, and the admin design system already set up.&lt;/p&gt;

&lt;p&gt;The organization is the account that owns the app. If you work for clients, pick your own, so the app doesn't end up in a client's account. It downloads the template and installs everything with npm.&lt;/p&gt;

&lt;p&gt;This takes a couple of minutes, so let's skip ahead. And here's my first real error. App name cannot contain Shopify.&lt;/p&gt;

&lt;p&gt;Shopify doesn't let app names include its own brand name. I called it my shopify app, so that's on me. Same command, new name: my store helper.&lt;/p&gt;

&lt;p&gt;Creating the app also registers it with Shopify, so it gets its own client ID, like an ID card for your app. Notice it says initializing project with npm. You can switch to yarn or pnpm with the package manager flag.&lt;/p&gt;

&lt;p&gt;And there it is. My store helper is ready for you to build. It even prints the next steps: change into the folder, generate extensions later, and run shopify app dev to see it.&lt;/p&gt;

&lt;h3&gt;
  
  
  The files that matter (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=182s" rel="noopener noreferrer"&gt;3:02&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Before we run it, let's look inside, because most of these files you'll never touch. The app folder is your actual app. Inside, routes holds your pages.&lt;/p&gt;

&lt;p&gt;Each file is one screen of your app. App underscore index is the home page. App additional is a second page.&lt;/p&gt;

&lt;p&gt;The webhook files are where Shopify sends events. Shopify server.js sets up login and the API connection for you, so you don't write any of that yourself. Then shopify.app.toml.&lt;/p&gt;

&lt;p&gt;This is your app's settings file: the name, the client ID, and the scopes. Scopes are permissions. The template asks for write products, which is why it can create products later.&lt;/p&gt;

&lt;p&gt;When a store installs your app, the merchant approves exactly these scopes. Ask only for what you really need, because merchants and Shopify's review both check it. Now the home page file.&lt;/p&gt;

&lt;p&gt;Two parts matter. The loader runs when the page opens and checks the merchant is logged in with authenticate admin. If you know React, think of the loader as getting data before the page shows, and the action as handling a form submit.&lt;/p&gt;

&lt;p&gt;And the action runs when you click the button. It calls admin.graphql with a productCreate mutation. That's your Admin API call.&lt;/p&gt;

&lt;p&gt;One more thing: the template now ships with agent files for AI coding tools. We'll use that in the next episode.&lt;/p&gt;

&lt;h3&gt;
  
  
  Run it in your store (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=275s" rel="noopener noreferrer"&gt;4:35&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Time to run it. Change into the folder, then shopify app dev, with my store. This command starts a local server, connects it to Shopify, and installs the app on the store you name.&lt;/p&gt;

&lt;p&gt;It reads the toml file and shows what it will use: my organization, my app, and my development store. It also says it will update the URLs. While you develop, the CLI points your app at your computer automatically, so you never edit those by hand.&lt;/p&gt;

&lt;p&gt;And if you ever connect the wrong store or app, the hint at the bottom matters: add dash dash reset to choose again. And then, error number two. Could not start Cloudflare tunnel.&lt;/p&gt;

&lt;p&gt;A timeout. The CLI creates a tunnel so Shopify can reach the app on your computer. Sometimes that network call just times out.&lt;/p&gt;

&lt;p&gt;The message gives two options: run the command again, or use localhost. I tried localhost first. Same command, plus dash dash use localhost.&lt;/p&gt;

&lt;p&gt;Read this note carefully: localhost doesn't work with features where Shopify calls your app, like webhooks. It also needs a local certificate, so I say yes, and it uses mkcert to make one. Windows asks once to trust that certificate.&lt;/p&gt;

&lt;p&gt;That's normal for local development. And error number three. The template subscribes to productUpdate events, and Shopify can't deliver those to localhost.&lt;/p&gt;

&lt;p&gt;That's exactly what the note warned about. So localhost is out for this template. Back to option one: run the plain command again.&lt;/p&gt;

&lt;p&gt;This time the tunnel connects. Ready, watching for changes in your app. Keep this terminal open while you work.&lt;/p&gt;

&lt;p&gt;If you close it, the app in your admin stops loading. You get two shortcuts: P opens the app preview, G opens GraphiQL to test Admin API queries. GraphiQL is a playground where you can try any Admin API query against your store before you put it in your code.&lt;/p&gt;

&lt;p&gt;My advice: if the tunnel fails, just run it again before changing anything else. It usually works the second time.&lt;/p&gt;

&lt;h3&gt;
  
  
  Your first API call (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=403s" rel="noopener noreferrer"&gt;6:43&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now open the preview link. It goes straight into the Shopify admin of my development store. Because it's a development store and we used the store flag, the app installs itself.&lt;/p&gt;

&lt;p&gt;There it is in the sidebar. On a real merchant's store, they would see an install screen with your scopes and approve it first. This is the home page from that app underscore index file.&lt;/p&gt;

&lt;p&gt;Let's press generate a product. That button runs the action we looked at. The app sends a productCreate mutation to the Admin API.&lt;/p&gt;

&lt;p&gt;And the real response comes back as JSON: an orange snowboard, its ID, handle, status, and variant. Shopify even shows a product created message at the top. This product now really exists in my store.&lt;/p&gt;

&lt;p&gt;Edit product opens it in the admin, so you can see it's a normal product, created by your app. That's the whole loop: page, button, API call, real data. Every Shopify app works this way.&lt;/p&gt;

&lt;p&gt;Want to read orders instead? Change the query. Want to update prices?&lt;/p&gt;

&lt;p&gt;Use a different mutation. The pattern stays the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Change it live (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=472s" rel="noopener noreferrer"&gt;7:52&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Last step: make it yours. I search for the page title in the home page file and change it to my store helper. Then the first card: my first Shopify app is running.&lt;/p&gt;

&lt;p&gt;Save. The dev server is still running and watching for changes. This is the workflow from now on: change code, save, and check the admin.&lt;/p&gt;

&lt;p&gt;You'll do this hundreds of times. Back in the admin, the new title and heading are already there. No restart, no redeploy.&lt;/p&gt;

&lt;h3&gt;
  
  
  3 mistakes to avoid (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=501s" rel="noopener noreferrer"&gt;8:21&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Before the recap, the three mistakes that cost me time today, so they don't cost you. One: putting Shopify in your app name. The CLI refuses it after the install, so you lose a couple of minutes.&lt;/p&gt;

&lt;p&gt;Two: panicking when the tunnel times out. It's usually a temporary network problem. Run the command again first.&lt;/p&gt;

&lt;p&gt;Three: using localhost with an app that has webhooks. The template has them, so localhost fails. Use the tunnel, or a tunnel URL of your own.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=gFDLhovNQ-E&amp;amp;t=539s" rel="noopener noreferrer"&gt;8:59&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, how to create a Shopify app: Node and the Shopify CLI, app init with a name that doesn't include Shopify, then shopify app dev on your development store. If the tunnel times out, run it again. And if you use localhost, remember webhooks won't work.&lt;/p&gt;

&lt;p&gt;You now have a real app that talks to the Admin API, and that's the base for every feature we build in this series. Your app is still a development app. Nobody else can install it until you deploy it and choose how to distribute it, which we'll cover later in the series.&lt;/p&gt;

&lt;p&gt;Ideas to practise right now: change the button text, show the shop's name on the home page, or list your five newest products. Next episode, I build a real feature in this same app with an AI coding agent, step by step, and show what it gets right and wrong. If you're building a Shopify app and want help, I'm a Shopify developer, and the link to work with me is in the description.&lt;/p&gt;

&lt;p&gt;See you in the next one.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/how-to-create-a-shopify-app-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/how-to-create-a-shopify-app-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Shopify Create Discount Code API 2026: Codes, Automatic, Buy X Get Y &amp; Free Shipping in Your App</title>
      <dc:creator>Fayyaz Ahmed</dc:creator>
      <pubDate>Fri, 27 Nov 2026 06:05:12 +0000</pubDate>
      <link>https://dev.to/fayyaz_ahmed_59771a838089/shopify-create-discount-code-api-2026-codes-automatic-buy-x-get-y-free-shipping-in-your-app-5e0b</link>
      <guid>https://dev.to/fayyaz_ahmed_59771a838089/shopify-create-discount-code-api-2026-codes-automatic-buy-x-get-y-free-shipping-in-your-app-5e0b</guid>
      <description>&lt;p&gt;Shopify create discount code API tutorial (2026): build a real discounts manager inside your Shopify app with the GraphQL Admin API 2026-10 - create discount codes and automatic discounts (percentage off, buy X get Y, free shipping), list them, edit, deactivate and delete them, on a real development store. Shopify app development series, episode 6 - everything shown is real, nothing skipped.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/fJASmAPi4-A" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;discountNodes: one list for codes AND automatic discounts (+ search: method, status)&lt;/li&gt;
&lt;li&gt;discountCodeBasicCreate, discountCodeBxgyCreate, discountAutomaticFreeShippingCreate&lt;/li&gt;
&lt;li&gt;Why context is now required ("Context can't be blank")&lt;/li&gt;
&lt;li&gt;Why 20% is 0.2 (VALUE_OUTSIDE_RANGE)&lt;/li&gt;
&lt;li&gt;Unique codes, edit, deactivate/activate, delete&lt;/li&gt;
&lt;li&gt;Polaris web components&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💻 &lt;strong&gt;Free source code for this episode:&lt;/strong&gt; &lt;a href="https://github.com/fayyaz315/shopify-app-development-2026/tree/ep06" rel="noopener noreferrer"&gt;https://github.com/fayyaz315/shopify-app-development-2026/tree/ep06&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3 quick fixes from this episode
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Shopify Discount API: Why 20% Off Fails (Send 0.2)
&lt;/h3&gt;

&lt;p&gt;Shopify discount API (GraphQL 2026-10): when you create a discount code, the percentage is a fraction from 0.0 to 1.0. I sent 20 for 20% and Shopify refused it with VALUE_OUTSIDE_RANGE - 0.2 works. Real error, then the working call.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/MJBLskYXHBw" rel="noopener noreferrer"&gt;https://youtube.com/shorts/MJBLskYXHBw&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify GraphQL Discount Code: Context Can't Be Blank (2026 Fix)
&lt;/h3&gt;

&lt;p&gt;Shopify GraphQL discount code (2026-10): discountCodeBasicCreate now needs context - who can use the code. Without it Shopify answers "Context can't be blank"; customerSelection is deprecated. Real error, then the fix.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/rOrKEpw-U-s" rel="noopener noreferrer"&gt;https://youtube.com/shorts/rOrKEpw-U-s&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Shopify Create Discount API: Buy 2 Get 1 Free in One Call
&lt;/h3&gt;

&lt;p&gt;Shopify create discount API (GraphQL 2026-10): a buy 2 get 1 free code from my own app with discountCodeBxgyCreate - customerBuys, customerGets with 100% off one item. Plus the one thing it refuses: 'all items'.&lt;/p&gt;

&lt;p&gt;▶ 60-second video: &lt;a href="https://youtube.com/shorts/riDFaSFiVrM" rel="noopener noreferrer"&gt;https://youtube.com/shorts/riDFaSFiVrM&lt;/a&gt;&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Step by step
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Preview + intro (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=0s" rel="noopener noreferrer"&gt;0:00&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;In the next ten minutes, you'll create real Shopify discounts from inside your own app. A discount code, buy two get one free, and free shipping that applies by itself, plus the two errors that break discount code from older tutorials. This is the Shopify create discount code API, running inside our own app.&lt;/p&gt;

&lt;p&gt;One click, and Black Friday Sale is a real, active code in the store. This is episode six of the Shopify app development series. Products, variants, collections and inventory are done.&lt;/p&gt;

&lt;p&gt;Today: discounts. The full code is free on GitHub, and the link is in the description.&lt;/p&gt;

&lt;h3&gt;
  
  
  How Shopify models discounts (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=41s" rel="noopener noreferrer"&gt;0:41&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;First, how Shopify thinks about discounts. Every discount has a method and a type. The method is how it reaches the customer.&lt;/p&gt;

&lt;p&gt;A discount code, which the customer types at checkout. Or automatic, which applies by itself when the cart qualifies. No code at all.&lt;/p&gt;

&lt;p&gt;The type is what it gives. Amount off, as a percentage or a fixed amount. Buy X get Y, like buy two, get one free.&lt;/p&gt;

&lt;p&gt;Free shipping, usually with a minimum order. And app discounts, where your own Shopify Function decides the logic. That's a different topic with its own videos on this channel.&lt;/p&gt;

&lt;p&gt;Method times type gives the API its names: discountCodeBasicCreate, discountAutomaticFreeShippingCreate, and so on.&lt;/p&gt;

&lt;h3&gt;
  
  
  The discounts page (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=90s" rel="noopener noreferrer"&gt;1:30&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now our app. There's a new Discounts page: every discount in the store in one table, codes and automatic ones together. A new page is a new file.&lt;/p&gt;

&lt;p&gt;The route file app.discounts becomes the URL /app/discounts. And the menu link is one line in the app layout. This episode needs one new permission: write discounts, in shopify.app.toml.&lt;/p&gt;

&lt;p&gt;Write includes read. Every request takes the same path as before: the page asks the loader, buttons call the action, both talk to the Admin API.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read: discountNodes (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=127s" rel="noopener noreferrer"&gt;2:07&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Reading first. One query for every kind of discount: discountNodes. Older code used codeDiscountNodes and automaticDiscountNodes.&lt;/p&gt;

&lt;p&gt;Both are deprecated in 2026-10. Each node wraps the real discount. Its type name tells you which one it is, like discount code basic.&lt;/p&gt;

&lt;p&gt;That's why the query has one fragment per type: title, status and summary, plus the first code for code discounts. sortKey createdAt with reverse true puts the newest discount first. That's why new ones appear at the top.&lt;/p&gt;

&lt;p&gt;The summary is Shopify's own sentence, like 20% off one time purchase products. We show it under the title, for free. Status is active, scheduled or expired.&lt;/p&gt;

&lt;p&gt;A start date in the future gives scheduled. I tested that too. The loader turns each node into a simple row.&lt;/p&gt;

&lt;p&gt;Automatic or code comes from the ID, and the type from the type name. The show select filters the list. Codes: only the discount codes.&lt;/p&gt;

&lt;p&gt;Automatic: four discounts. Three of them were made by another app, the Kaching bundles app, so they have no buttons. There's no special code for that.&lt;/p&gt;

&lt;p&gt;Each option is just discountNodes search syntax: method:code, or status:active. App discounts are owned by the app that made them. Our app can list them, but editing belongs to that app's Function.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 2026 rules (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=218s" rel="noopener noreferrer"&gt;3:38&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Before we create anything, here's the same list in GraphiQL, filtered to codes. Four discount code basic results, each with title, status and summary. Exactly what the table shows.&lt;/p&gt;

&lt;p&gt;Now discountCodeBasicCreate, the way many tutorials still write it: a title, a code, a start date and 10% off. Refused. Context can't be blank.&lt;/p&gt;

&lt;p&gt;Shopify now wants to know who can use the code. Context replaces customerSelection, which is deprecated. For everyone, it's simply context, all, all.&lt;/p&gt;

&lt;p&gt;So we add context, and while we're here, I write ten for 10%. That looks reasonable. Refused again.&lt;/p&gt;

&lt;p&gt;Value must be between zero and one. Shopify's percentage is a fraction. 10% is 0.1.&lt;/p&gt;

&lt;p&gt;Same request, with 0.1. Created. Welcome ten is active, and the summary says 10% off one time purchase products.&lt;/p&gt;

&lt;p&gt;Those are the three rules for codes in 2026: context, a fraction for the percentage, and a unique code. One more useful query: find a discount by its code. I type it in lower case on purpose.&lt;/p&gt;

&lt;p&gt;Found anyway. Codes don't care about upper or lower case, and that matters in a minute.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create a discount code (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=298s" rel="noopener noreferrer"&gt;4:58&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Back in the app. Create discount opens one form for everything: method, type, title and code. Black Friday Sale, code BLACKFRIDAY, 20%.&lt;/p&gt;

&lt;p&gt;Create, and it's in the list. Six combinations means six create mutations. Instead of six copies, one table maps method and type to the mutation name, argument and input type.&lt;/p&gt;

&lt;p&gt;And one small function builds the mutation text from that table. One lesson from episode four: keep that table as plain data. Functions are only called for the one combination you need.&lt;/p&gt;

&lt;p&gt;Input for builds what Shopify expects from the form. For codes: the code, and context, all. For percentage off: the form says twenty, so we divide by a hundred.&lt;/p&gt;

&lt;p&gt;That's the 0.2 Shopify wants. Items all means every product. You could also pass products or collections here.&lt;/p&gt;

&lt;p&gt;Shopify also sets the discount class from the items. 20% off everything came back as an order discount, a product list as a product discount. And the create case adds a start date of now.&lt;/p&gt;

&lt;p&gt;Without starts at, Shopify can't make it active.&lt;/p&gt;

&lt;h3&gt;
  
  
  Codes must be unique (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=370s" rel="noopener noreferrer"&gt;6:10&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now a mistake on purpose. A second discount, with the same code in lower case. Code must be unique.&lt;/p&gt;

&lt;p&gt;Please try a different code. Shopify compares codes ignoring case, like we saw in GraphiQL. In the action, every mutation returns userErrors.&lt;/p&gt;

&lt;p&gt;If there are any, we send them to the page instead of a success message. And the page shows Shopify's own message in a red toast. No guessing, no generic something went wrong.&lt;/p&gt;

&lt;p&gt;After a success, a toast, the modal closes, and React Router reloads the list by itself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Buy X get Y (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=410s" rel="noopener noreferrer"&gt;6:50&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Next, buy X get Y. Same form, type buy X get Y, and the fields change: a product, how many they buy, and how many they get free. Buy two tees, get one free.&lt;/p&gt;

&lt;p&gt;Code TEE3, the everyday crew neck tee, buys two, gets one. Created. Shopify's summary: buy two items, get one item free.&lt;/p&gt;

&lt;p&gt;The input has two halves. Customer buys: a quantity of two, of this product. Customer gets: one item, with an effect of 100% off.&lt;/p&gt;

&lt;p&gt;That's what free means to the API. I tested one shortcut: customer gets all items. Shopify refuses it.&lt;/p&gt;

&lt;p&gt;Buy X get Y always needs real products or collections. The product list in the form comes from the same loader query: our ten demo products, sorted by title.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automatic free shipping (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=461s" rel="noopener noreferrer"&gt;7:41&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Now an automatic one. Method automatic, type free shipping. The code field disappears.&lt;/p&gt;

&lt;p&gt;Free shipping over $75, with a minimum purchase of seventy five. Created. Free shipping on all products, minimum purchase $75, for all countries.&lt;/p&gt;

&lt;p&gt;No code to type. Free shipping needs a destination. Ours is all countries.&lt;/p&gt;

&lt;p&gt;And the minimum becomes a minimumRequirement with a subtotal. I tried a minimum subtotal and a minimum quantity together. Conflict: pick one.&lt;/p&gt;

&lt;p&gt;And automatic discounts don't need context. That rule is only for codes. In the form, the method and type selects control which fields appear.&lt;/p&gt;

&lt;p&gt;Polaris selects need the change event hook from episode four.&lt;/p&gt;

&lt;h3&gt;
  
  
  Edit, deactivate, delete (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=511s" rel="noopener noreferrer"&gt;8:31&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;Edit Black Friday. The form opens with the current twenty, and I make it twenty five. Saved.&lt;/p&gt;

&lt;p&gt;The summary now says 25% off. Update takes the same input as create. You only send the fields you change, and Shopify keeps the rest.&lt;/p&gt;

&lt;p&gt;Notice what an update doesn't send: no code, no context, no destination. Those stay exactly as they were. The current percentage comes back as a fraction too, so the loader multiplies by a hundred for the form.&lt;/p&gt;

&lt;p&gt;Deactivate. The badge turns to expired, and the button becomes activate. Activate, and it's active again.&lt;/p&gt;

&lt;p&gt;On the page, an expired row gets activate instead of deactivate. Everything else stays the same. There's no paused state.&lt;/p&gt;

&lt;p&gt;Deactivate simply sets the end date to now, so the status becomes expired. Activate removes the end date. And delete the buy two get one.&lt;/p&gt;

&lt;p&gt;Discount deleted. It's gone from the store. Codes and automatic discounts have separate activate, deactivate and delete mutations.&lt;/p&gt;

&lt;p&gt;The action picks by method. I tested the wrong one: an automatic delete with a code ID. Shopify just says invalid ID.&lt;/p&gt;

&lt;h3&gt;
  
  
  Honest notes (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=581s" rel="noopener noreferrer"&gt;9:41&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;A few honest notes before the recap. One: I load twenty five discounts. A busy store needs pagination, like the products page in episode two.&lt;/p&gt;

&lt;p&gt;Two: the form covers the common cases. The API also has fixed amounts, customer segments, markets, usage limits and end dates. Three: when the built-in types aren't enough, like tiered pricing, that's Shopify Functions.&lt;/p&gt;

&lt;p&gt;Linked in the description. Want to practise? Add an end date field, or a usage limit, so a code can only be used a hundred times.&lt;/p&gt;

&lt;p&gt;And everything you saw was tested on my real development store on API version 2026-10, before I pressed record.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recap (&lt;a href="https://www.youtube.com/watch?v=fJASmAPi4-A&amp;amp;t=626s" rel="noopener noreferrer"&gt;10:26&lt;/a&gt;)
&lt;/h3&gt;

&lt;p&gt;So, the recap. Read every discount with discountNodes, and filter with search syntax. Create with one mutation per method and type.&lt;/p&gt;

&lt;p&gt;For codes, always send context, and percentages from zero to one. Update with the same input, and end a discount with deactivate or delete. That's the Shopify create discount code API in 2026, inside a real app, on a real store.&lt;/p&gt;

&lt;p&gt;The full code for this episode is free on GitHub. The link is in the description. Next episode: metafields.&lt;/p&gt;

&lt;p&gt;Your own fields on products, with definitions and values. See you there.&lt;/p&gt;




&lt;p&gt;📖 The full written tutorial with every episode: &lt;a href="https://www.wixob.com/shopify-create-discount-code-api-tutorial/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-create-discount-code-api-tutorial/&lt;/a&gt;&lt;br&gt;
📚 Course page: &lt;a href="https://www.wixob.com/shopify-app-development-2026/" rel="noopener noreferrer"&gt;https://www.wixob.com/shopify-app-development-2026/&lt;/a&gt;&lt;br&gt;
🔔 New episodes on YouTube: &lt;a href="https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1" rel="noopener noreferrer"&gt;https://www.youtube.com/@fayyaz-ahmed-shopify-developer?sub_confirmation=1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Questions about the Shopify GraphQL Admin API? Ask in the comments — I answer every one.&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>graphql</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
