GraphQL https://michalak.world/ en Shopify Draft Order Metafields https://michalak.world/article/shopify-draft-order-metafields <span>Shopify Draft Order Metafields</span> <span><span>useradmin</span></span> <span>Thu, 08/03/2023 - 10:58</span> <div class="primary-image field field--name-field-image field--type-image field--label-above"> <div class="field__label">Image</div> <div class="field__item"> <img loading="lazy" src="/sites/default/files/default_images/cover.png" width="2010" height="1343" alt="Default blog post image" title="Default blog post image" /> </div> </div> <div class="text-content clearfix field field--name-body field--type-text-with-summary field--label-above"> <div class="field__label">Body</div> <div class="field__item"><p>While trying to track data on draft orders and orders I wanted to use metafields.  This lead me to find out that draft orders <em>cannot</em> have metafields configured. </p> <p>These lead me to two options to track data.  </p> <ul><li>Note attributes on the order</li> <li>A custom mysql database table for my app to track the data.</li> </ul><p>I've used both depending on the type of data and how store clerks needed to update the data. </p></div> </div> <section data-drupal-selector="comments" class="comments"> <h2 class="comments__title">Comments</h2> <div class="add-comment"> <div class="add-comment__form"> <drupal-render-placeholder callback="comment.lazy_builders:renderForm" arguments="0=node&amp;1=86&amp;2=comment&amp;3=comment" token="CGmpPRhnlMXaFimtyH7eZb79-Tr-YnlGRCFI43XIPaE"></drupal-render-placeholder> </div> </div> </section> <div class="field field--name-field-tags field--type-entity-reference field--label-above field--tags"> <h3 class="field__label field--tags__label">Tags</h3> <ul class="links field__items field--tags__items"> <li class="field--tags__item"><div> <h2><a href="/tag/graphql"> <div class="field field--name-name field--type-string field--label-hidden field__item">GraphQL</div> </a></h2> </div> </li> <li class="field--tags__item"><div> <h2><a href="/tag/metafield"> <div class="field field--name-name field--type-string field--label-hidden field__item">Metafield</div> </a></h2> </div> </li> <li class="field--tags__item"><div> <h2><a href="/tag/node-js"> <div class="field field--name-name field--type-string field--label-hidden field__item">Node JS</div> </a></h2> </div> </li> <li class="field--tags__item"><div> <h2><a href="/tag/polaris"> <div class="field field--name-name field--type-string field--label-hidden field__item">Polaris</div> </a></h2> </div> </li> <li class="field--tags__item"><div> <h2><a href="/tag/rest-api"> <div class="field field--name-name field--type-string field--label-hidden field__item">REST API</div> </a></h2> </div> </li> <li class="field--tags__item"><div> <h2><a href="/tag/shopify"> <div class="field field--name-name field--type-string field--label-hidden field__item">Shopify</div> </a></h2> </div> </li> </ul> </div> Thu, 03 Aug 2023 15:58:10 +0000 useradmin 86 at https://michalak.world