Skip to content

Instantly share code, notes, and snippets.

View jaredkc's full-sized avatar

Jared Cornwall jaredkc

  • Salt Lake City, UT
View GitHub Profile
@jaredkc
jaredkc / productByHandleSellingPlans.graphql
Created September 29, 2024 18:57
Shopify GraphQL query productByHandle with sellingPlans
query {
productByHandle(handle: "protein-juice-cleanse") {
id
title
requiresSellingPlan
sellingPlanGroups(first:1) {
edges {
node {
sellingPlans(first: 6) {
edges {
@jaredkc
jaredkc / productsQueryById.graphql
Created September 29, 2024 23:07
Shopify GraphQL query for 2 specific products
query {
products(first: 10, query: "(id:1234567890) OR (id:0987654321)") {
edges {
node {
title
id
}
}
}
}
@jaredkc
jaredkc / README.md
Last active October 20, 2025 16:21
Shopify "Press reviews"

Important: You'll need to replace YOUR_METAOBJECT_DEFINITION_ID with the actual ID of the "Press reviews" metaobject definition from the target store. After you create the metaobject definition using the first mutation I provided, you'll get back an ID that you can use here in the validation value.

This metafield allows you to attach a list of press review metaobjects to your products, making it accessible from both the admin and your storefront.

Or, you can look up the ID with this GraphQL query:

query GetPressReviewsMetaobjectDefinitionId {
  metaobjectDefinitionByType(type: "press_reviews") {
 id
@jaredkc
jaredkc / video-optimization-for-web.md
Created November 21, 2025 16:19
Video Optimization for Web

Video Optimization for Web

Quick Command

Convert a single video to web-optimized MP4:

ffmpeg -i input.mov -vf "scale=-2:1080:flags=lanczos" -c:v libx264 -crf 23 -preset slow -c:a aac -b:a 128k -movflags +faststart output_web.mp4