MCPcopy Create free account
hub / github.com/Shopify/function-examples

github.com/Shopify/function-examples @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
318 symbols 522 edges 206 files 6 documented · 2% updated 4mo ago★ 24213 open issues

Browse by type

Functions 262 Types & classes 56
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Function Examples

This is the home of all the public examples of Shopify Functions. It's used by the CLI when running yarn shopify app generate extension. Feel free to look around! Do not edit these files directly.

Local Development

Expand Liquid Templates

If you wish to run the samples directly from this repository, you must first expand any .liquid templates with the following command.

yarn
yarn expand-liquid
# optionally provide the language flavor
yarn expand-liquid vanilla-js
yarn expand-liquid typescript

Run Tests

# JavaScript
yarn test-js
# TypeScript
yarn test-ts
# Rust
cargo test

Lint

# currently only applies to Rust
cargo fmt
cargo clippy -- -D warnings

Extension points exported contracts — how you extend this code

browse all types & interfaces →

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 227
Class 52
Method 35
Interface 4

Languages

TypeScript42%
Rust41%
Ruby18%

Modules by API surface

sample-apps/bundles-cart-transform/extensions/cart-merge-expand_rust/src/run.rs15 symbols
checkout/rust/cart-transform/bundles/src/run.rs14 symbols
order-routing/rust/pickup-point-delivery-option-generators/default/src/run.rs10 symbols
sample-apps/delivery-customizations/app/routes/app.delivery-customization.$functionId.$id.tsx8 symbols
sample-apps/payment-customizations/extensions/payment-customization-rust/src/run.rs7 symbols
sample-apps/discounts/extensions/product-discount-rust/src/run.rs7 symbols
sample-apps/payment-customizations/app/routes/app.payment-customization.$functionId.$id.jsx6 symbols
sample-apps/delivery-customizations/extensions/delivery-customization-rust/src/run.rs6 symbols
util/expand-liquid.js5 symbols
sample-apps/payment-customizations/app/routes/app._index.jsx5 symbols
sample-apps/discounts/app/routes/app.jsx5 symbols
sample-apps/delivery-customizations/app/routes/app._index.tsx5 symbols

For agents

$ claude mcp add function-examples \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page