Showing preview only (5,126K chars total). Download the full file or copy to clipboard to get everything.
Repository: Shopify/function-examples
Branch: main
Commit: 19ccafceda1d
Files: 692
Total size: 4.7 MB
Directory structure:
gitextract_2gpo66g9/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── template-or-example-issue.md
│ ├── dependabot.yaml
│ └── workflows/
│ ├── cla.yml
│ ├── javascript.yml
│ ├── rust.yml
│ └── typescript.yml
├── .gitignore
├── .graphqlrc.cjs
├── CODE_OF_CONDUCT.md
├── Cargo.toml
├── LICENSE.md
├── README.md
├── checkout/
│ ├── javascript/
│ │ ├── cart-checkout-validation/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── cart-transform/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── delivery-customization/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ └── payment-customization/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ ├── src/
│ │ │ ├── index.liquid
│ │ │ ├── run.graphql.liquid
│ │ │ ├── run.liquid
│ │ │ └── run.test.liquid
│ │ └── vite.config.js
│ ├── rust/
│ │ ├── cart-checkout-validation/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── cart-transform/
│ │ │ ├── bundles/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Cargo.toml.liquid
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json.liquid
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml.liquid
│ │ │ │ └── src/
│ │ │ │ ├── main.rs
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ └── run.rs
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── delivery-customization/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ └── payment-customization/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── Cargo.toml.liquid
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ ├── main.rs
│ │ ├── run.graphql.liquid
│ │ └── run.rs
│ └── wasm/
│ ├── cart-checkout-validation/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── cart-transform/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── delivery-customization/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ └── payment-customization/
│ └── default/
│ ├── locales/
│ │ └── en.default.json.liquid
│ ├── run.graphql.liquid
│ ├── schema.graphql
│ └── shopify.extension.toml.liquid
├── discounts/
│ ├── javascript/
│ │ ├── discount/
│ │ │ └── default/
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── cart_delivery_options_discounts_generate_run.graphql.liquid
│ │ │ │ ├── cart_delivery_options_discounts_generate_run.liquid
│ │ │ │ ├── cart_delivery_options_discounts_generate_run.test.liquid
│ │ │ │ ├── cart_lines_discounts_generate_run.graphql.liquid
│ │ │ │ ├── cart_lines_discounts_generate_run.liquid
│ │ │ │ ├── cart_lines_discounts_generate_run.test.liquid
│ │ │ │ └── index.liquid
│ │ │ └── vite.config.js
│ │ ├── discounts-allocator/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── order-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── product-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ └── shipping-discounts/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ ├── src/
│ │ │ ├── index.liquid
│ │ │ ├── run.graphql.liquid
│ │ │ ├── run.liquid
│ │ │ └── run.test.liquid
│ │ └── vite.config.js
│ ├── rust/
│ │ ├── discount/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── cart_delivery_options_discounts_generate_run.graphql.liquid
│ │ │ ├── cart_delivery_options_discounts_generate_run.rs
│ │ │ ├── cart_lines_discounts_generate_run.graphql.liquid
│ │ │ ├── cart_lines_discounts_generate_run.rs
│ │ │ └── main.rs
│ │ ├── discounts-allocator/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── order-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── product-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ └── shipping-discounts/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── Cargo.toml.liquid
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ ├── main.rs
│ │ ├── run.graphql.liquid
│ │ └── run.rs
│ └── wasm/
│ ├── discount/
│ │ └── default/
│ │ ├── cart_delivery_options_generate_run.graphql.liquid
│ │ ├── cart_lines_discounts_generate_run.graphql.liquid
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── discounts-allocator/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ └── run.graphql.liquid
│ ├── order-discounts/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── product-discounts/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ └── shipping-discounts/
│ └── default/
│ ├── locales/
│ │ └── en.default.json.liquid
│ ├── run.graphql.liquid
│ ├── schema.graphql
│ └── shopify.extension.toml.liquid
├── order-routing/
│ ├── javascript/
│ │ ├── fulfillment-constraints/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── local-pickup-delivery-option-generators/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── location-rules/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ └── pickup-point-delivery-option-generators/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ ├── src/
│ │ │ ├── fetch.liquid
│ │ │ ├── fetch.test.liquid
│ │ │ ├── index.liquid
│ │ │ ├── run.liquid
│ │ │ └── run.test.liquid
│ │ └── vite.config.js
│ ├── rust/
│ │ ├── fulfillment-constraints/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── local-pickup-delivery-option-generators/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── metadata.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── location-rules/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ └── pickup-point-delivery-option-generators/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── Cargo.toml.liquid
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ ├── fetch.rs
│ │ ├── main.rs
│ │ └── run.rs
│ ├── typescript/
│ │ └── pickup-point-delivery-option-generators/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── vite.config.js
│ └── wasm/
│ ├── fulfillment-constraints/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── local-pickup-delivery-option-generators/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ └── run.graphql.liquid
│ ├── location-rules/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ └── pickup-point-delivery-option-generators/
│ └── default/
│ ├── fetch.graphql.liquid
│ ├── locales/
│ │ └── en.default.json.liquid
│ ├── run.graphql.liquid
│ ├── schema.graphql
│ └── shopify.extension.toml.liquid
├── package.json
├── sample-apps/
│ ├── bundles-cart-transform/
│ │ ├── .dockerignore
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── .ruby-version
│ │ ├── .vscode/
│ │ │ └── extensions.json
│ │ ├── Dockerfile
│ │ ├── GETTING_STARTED.md
│ │ ├── README.md
│ │ ├── entrypoint.sh
│ │ ├── extensions/
│ │ │ ├── cart-expand-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── input.graphql
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ └── index.test.js
│ │ │ └── cart-merge-expand_rust/
│ │ │ ├── Cargo.toml
│ │ │ ├── input.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── resources/
│ │ │ └── component_parents_schema.json
│ │ ├── shopify.app.toml
│ │ └── web/
│ │ ├── .gitignore
│ │ ├── Gemfile
│ │ ├── Rakefile
│ │ ├── app/
│ │ │ ├── assets/
│ │ │ │ ├── config/
│ │ │ │ │ └── manifest.js
│ │ │ │ ├── images/
│ │ │ │ │ └── .keep
│ │ │ │ └── stylesheets/
│ │ │ │ └── application.css
│ │ │ ├── channels/
│ │ │ │ └── application_cable/
│ │ │ │ ├── channel.rb
│ │ │ │ └── connection.rb
│ │ │ ├── controllers/
│ │ │ │ ├── application_controller.rb
│ │ │ │ ├── authenticated_controller.rb
│ │ │ │ ├── concerns/
│ │ │ │ │ └── .keep
│ │ │ │ ├── home_controller.rb
│ │ │ │ └── products_controller.rb
│ │ │ ├── helpers/
│ │ │ │ └── application_helper.rb
│ │ │ ├── javascript/
│ │ │ │ ├── application.js
│ │ │ │ └── lib/
│ │ │ │ ├── flash_messages.js
│ │ │ │ └── shopify_app.js
│ │ │ ├── jobs/
│ │ │ │ ├── app_uninstalled_job.rb
│ │ │ │ ├── application_job.rb
│ │ │ │ ├── customers_data_request_job.rb
│ │ │ │ ├── customers_redact_job.rb
│ │ │ │ ├── shop_redact_job.rb
│ │ │ │ └── shopify/
│ │ │ │ └── after_authenticate_job.rb
│ │ │ ├── mailers/
│ │ │ │ └── application_mailer.rb
│ │ │ ├── models/
│ │ │ │ ├── application_record.rb
│ │ │ │ ├── build_commands.rb
│ │ │ │ ├── concerns/
│ │ │ │ │ └── .keep
│ │ │ │ └── shop.rb
│ │ │ ├── services/
│ │ │ │ ├── application_service.rb
│ │ │ │ └── product_creator.rb
│ │ │ └── views/
│ │ │ └── layouts/
│ │ │ ├── _flash_messages.html.erb
│ │ │ ├── application.html.erb
│ │ │ ├── embedded_app.html.erb
│ │ │ ├── mailer.html.erb
│ │ │ └── mailer.text.erb
│ │ ├── bin/
│ │ │ ├── bundle
│ │ │ ├── importmap
│ │ │ ├── rails
│ │ │ ├── rake
│ │ │ └── setup
│ │ ├── config/
│ │ │ ├── application.rb
│ │ │ ├── boot.rb
│ │ │ ├── cable.yml
│ │ │ ├── database.yml
│ │ │ ├── environment.rb
│ │ │ ├── environments/
│ │ │ │ ├── development.rb
│ │ │ │ ├── production.rb
│ │ │ │ └── test.rb
│ │ │ ├── importmap.rb
│ │ │ ├── initializers/
│ │ │ │ ├── assets.rb
│ │ │ │ ├── content_security_policy.rb
│ │ │ │ ├── filter_parameter_logging.rb
│ │ │ │ ├── inflections.rb
│ │ │ │ ├── permissions_policy.rb
│ │ │ │ ├── session_store.rb
│ │ │ │ └── shopify_app.rb
│ │ │ ├── locales/
│ │ │ │ └── en.yml
│ │ │ ├── puma.rb
│ │ │ ├── routes.rb
│ │ │ └── storage.yml
│ │ ├── config.ru
│ │ ├── db/
│ │ │ ├── migrate/
│ │ │ │ ├── 20220609125627_create_shops.rb
│ │ │ │ ├── 20220609125631_add_shop_access_scopes_column.rb
│ │ │ │ └── 20230201144826_add_registered_to_shops.rb
│ │ │ ├── schema.rb
│ │ │ └── seeds.rb
│ │ ├── frontend/
│ │ │ ├── .gitignore
│ │ │ ├── App.jsx
│ │ │ ├── README.md
│ │ │ ├── Routes.jsx
│ │ │ ├── assets/
│ │ │ │ └── index.js
│ │ │ ├── components/
│ │ │ │ ├── ProductsCard.jsx
│ │ │ │ ├── index.js
│ │ │ │ └── providers/
│ │ │ │ ├── AppBridgeProvider.jsx
│ │ │ │ ├── PolarisProvider.jsx
│ │ │ │ ├── QueryProvider.jsx
│ │ │ │ └── index.js
│ │ │ ├── dev_embed.js
│ │ │ ├── hooks/
│ │ │ │ ├── index.js
│ │ │ │ ├── useAppQuery.js
│ │ │ │ └── useAuthenticatedFetch.js
│ │ │ ├── index.html
│ │ │ ├── index.jsx
│ │ │ ├── package.json
│ │ │ ├── pages/
│ │ │ │ ├── ExitIframe.jsx
│ │ │ │ ├── NotFound.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ └── readme.jsx
│ │ │ ├── shopify.web.toml
│ │ │ └── vite.config.js
│ │ ├── lib/
│ │ │ ├── assets/
│ │ │ │ └── .keep
│ │ │ └── tasks/
│ │ │ └── build.rake
│ │ ├── log/
│ │ │ └── .keep
│ │ ├── public/
│ │ │ ├── 404.html
│ │ │ ├── 422.html
│ │ │ ├── 500.html
│ │ │ ├── dist/
│ │ │ │ └── .keep
│ │ │ └── robots.txt
│ │ ├── rubocop.yml
│ │ ├── shopify.web.toml
│ │ ├── storage/
│ │ │ └── .keep
│ │ ├── template.rb
│ │ ├── test/
│ │ │ ├── application_system_test_case.rb
│ │ │ ├── channels/
│ │ │ │ └── application_cable/
│ │ │ │ └── connection_test.rb
│ │ │ ├── fixtures/
│ │ │ │ └── files/
│ │ │ │ └── .keep
│ │ │ ├── helpers/
│ │ │ │ └── .keep
│ │ │ ├── integration/
│ │ │ │ └── .keep
│ │ │ ├── mailers/
│ │ │ │ └── .keep
│ │ │ ├── models/
│ │ │ │ └── .keep
│ │ │ ├── system/
│ │ │ │ └── .keep
│ │ │ └── test_helper.rb
│ │ ├── tmp/
│ │ │ ├── .keep
│ │ │ ├── pids/
│ │ │ │ └── .keep
│ │ │ └── storage/
│ │ │ └── .keep
│ │ └── vendor/
│ │ ├── .keep
│ │ └── javascript/
│ │ └── .keep
│ ├── bundles-price-per-component/
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── README.md
│ │ ├── extensions/
│ │ │ ├── price-per-component-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── price-per-component-rs/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ ├── run.input.json
│ │ │ ├── run.output.json
│ │ │ └── run.rs
│ │ ├── package.json
│ │ └── shopify.app.toml
│ ├── delivery-customizations/
│ │ ├── .dockerignore
│ │ ├── .editorconfig
│ │ ├── .eslintignore
│ │ ├── .eslintrc.cjs
│ │ ├── .gitignore
│ │ ├── .graphqlrc.ts
│ │ ├── .npmrc
│ │ ├── .prettierignore
│ │ ├── CHANGELOG.md
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── db.server.ts
│ │ │ ├── entry.server.tsx
│ │ │ ├── globals.d.ts
│ │ │ ├── root.tsx
│ │ │ ├── routes/
│ │ │ │ ├── _index/
│ │ │ │ │ ├── route.tsx
│ │ │ │ │ └── styles.module.css
│ │ │ │ ├── app._index.tsx
│ │ │ │ ├── app.additional.tsx
│ │ │ │ ├── app.delivery-customization.$functionId.$id.tsx
│ │ │ │ ├── app.tsx
│ │ │ │ ├── auth.$.tsx
│ │ │ │ ├── auth.login/
│ │ │ │ │ ├── error.server.tsx
│ │ │ │ │ └── route.tsx
│ │ │ │ ├── webhooks.app.scopes_update.tsx
│ │ │ │ └── webhooks.app.uninstalled.tsx
│ │ │ ├── routes.ts
│ │ │ └── shopify.server.ts
│ │ ├── env.d.ts
│ │ ├── extensions/
│ │ │ ├── delivery-customization-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── delivery-customization-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── prisma/
│ │ │ ├── migrations/
│ │ │ │ └── 20240530213853_create_session_table/
│ │ │ │ └── migration.sql
│ │ │ └── schema.prisma
│ │ ├── react-router.config.ts
│ │ ├── shopify.app.toml
│ │ ├── shopify.web.toml
│ │ ├── tsconfig.json
│ │ └── vite.config.ts
│ ├── discounts/
│ │ ├── .dockerignore
│ │ ├── .editorconfig
│ │ ├── .eslintignore
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── .graphqlrc.js
│ │ ├── .npmrc
│ │ ├── .prettierignore
│ │ ├── .vscode/
│ │ │ └── extensions.json
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── components/
│ │ │ │ ├── NotFoundPage/
│ │ │ │ │ ├── NotFoundPage.jsx
│ │ │ │ │ └── index.js
│ │ │ │ └── providers/
│ │ │ │ └── DiscountProvider.jsx
│ │ │ ├── db.server.js
│ │ │ ├── entry.server.jsx
│ │ │ ├── root.jsx
│ │ │ ├── routes/
│ │ │ │ ├── _index/
│ │ │ │ │ ├── route.jsx
│ │ │ │ │ └── style.css
│ │ │ │ ├── app._index.jsx
│ │ │ │ ├── app.additional.jsx
│ │ │ │ ├── app.jsx
│ │ │ │ ├── app.volume-discount.$functionId.$id.jsx
│ │ │ │ ├── app.volume-discount.$functionId.new.jsx
│ │ │ │ ├── auth.$.jsx
│ │ │ │ ├── auth.login/
│ │ │ │ │ ├── error.server.jsx
│ │ │ │ │ └── route.jsx
│ │ │ │ └── webhooks.jsx
│ │ │ ├── shopify.server.js
│ │ │ └── utils/
│ │ │ └── navigation.js
│ │ ├── extensions/
│ │ │ ├── product-discount-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── product-discount-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── prisma/
│ │ │ ├── migrations/
│ │ │ │ └── 20230615155147_create_session_table/
│ │ │ │ └── migration.sql
│ │ │ └── schema.prisma
│ │ ├── remix.config.js
│ │ ├── shopify.app.toml
│ │ ├── shopify.web.toml
│ │ └── tsconfig.json
│ ├── optional-add-ons-cart-transform/
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── README.md
│ │ ├── extensions/
│ │ │ ├── optional-add-ons-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── optional-add-ons-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ └── shopify.app.toml
│ ├── payment-customizations/
│ │ ├── .dockerignore
│ │ ├── .editorconfig
│ │ ├── .eslintignore
│ │ ├── .eslintrc.cjs
│ │ ├── .gitignore
│ │ ├── .graphqlrc.js
│ │ ├── .npmrc
│ │ ├── .prettierignore
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── db.server.js
│ │ │ ├── entry.server.jsx
│ │ │ ├── root.jsx
│ │ │ ├── routes/
│ │ │ │ ├── _index/
│ │ │ │ │ ├── route.jsx
│ │ │ │ │ └── styles.module.css
│ │ │ │ ├── app._index.jsx
│ │ │ │ ├── app.additional.jsx
│ │ │ │ ├── app.jsx
│ │ │ │ ├── app.payment-customization.$functionId.$id.jsx
│ │ │ │ ├── auth.$.jsx
│ │ │ │ ├── auth.login/
│ │ │ │ │ ├── error.server.js
│ │ │ │ │ └── route.jsx
│ │ │ │ ├── webhooks.app.scopes_update.jsx
│ │ │ │ └── webhooks.app.uninstalled.jsx
│ │ │ ├── routes.js
│ │ │ └── shopify.server.js
│ │ ├── extensions/
│ │ │ ├── payment-customization-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── payment-customization-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── prisma/
│ │ │ ├── migrations/
│ │ │ │ └── 20240530213853_create_session_table/
│ │ │ │ └── migration.sql
│ │ │ └── schema.prisma
│ │ ├── react-router.config.js
│ │ ├── shopify.app.toml
│ │ ├── shopify.web.toml
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ └── update-line-item/
│ ├── .gitignore
│ ├── .npmrc
│ ├── README.md
│ ├── extensions/
│ │ └── update-line-item-js/
│ │ ├── .gitignore
│ │ ├── package.json
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml
│ │ └── src/
│ │ ├── index.js
│ │ ├── run.graphql
│ │ ├── run.js
│ │ └── run.test.js
│ ├── package.json
│ └── shopify.app.toml
└── util/
└── expand-liquid.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
blank_issues_enabled: false
contact_links:
- name: Functions on Shopify Community
url: https://community.shopify.com/c/shopify-functions/bd-p/functions
about: Please direct questions and issues to the Functions board on Shopify Community.
- name: Functions feature requests
url: https://github.com/Shopify/function-examples/discussions
about: Please post feature requests to the appropriate category in Discussions.
================================================
FILE: .github/ISSUE_TEMPLATE/template-or-example-issue.md
================================================
---
name: Issue with a template or sample
about: Log an issue regarding the template and sample code in this repo.
title: ""
assignees: ""
---
<!--
Issues should only be reported here for the example code in this repository.
Shopify Functions questions and issues can be posted to Shopify Community:
https://community.shopify.com/c/shopify-functions/bd-p/functions
Functions feature requests can be posted to Discussions:
https://github.com/Shopify/function-examples/discussions
-->
## Which template or example
Specify the sample or template, and what flavor/language, if applicable.
## Describe the bug
A clear and concise description of what the bug is.
## Steps to reproduce
Include the Shopify CLI command to reproduce, if applicable.
## Expected behavior
A clear and concise description of what you expected to happen.
## Environment
* Operating system
* Shopify CLI version
## Additional context
Add any other context about the problem here.
================================================
FILE: .github/dependabot.yaml
================================================
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
================================================
FILE: .github/workflows/cla.yml
================================================
name: Contributor License Agreement (CLA)
on:
pull_request_target:
types: [opened, synchronize]
issue_comment:
types: [created]
jobs:
cla:
runs-on: ubuntu-latest
if: |
(github.event.issue.pull_request
&& !github.event.issue.pull_request.merged_at
&& contains(github.event.comment.body, 'signed')
)
|| (github.event.pull_request && !github.event.pull_request.merged)
steps:
- uses: Shopify/shopify-cla-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
cla-token: ${{ secrets.CLA_TOKEN }}
================================================
FILE: .github/workflows/javascript.yml
================================================
name: JavaScript
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install dependencies
run: yarn
- name: Expand liquid
run: CI=1 yarn expand-liquid vanilla-js
- name: Install workspace dependencies
run: yarn
- name: Generate types
run: yarn typegen
- name: Test
run: yarn workspaces run test run
================================================
FILE: .github/workflows/rust.yml
================================================
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Add rustfmt and clippy
run: rustup component add rustfmt clippy
- name: Install node dependencies
run: yarn
- name: Expand liquid
run: CI=1 yarn expand-liquid rust
- name: Run cargo fmt
run: cargo fmt --check
- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test
- name: Add wasm32-wasip1 target
run: rustup target add wasm32-wasip1
- name: Build with wasm32-wasip1 target
run: cargo build --release --target wasm32-wasip1
================================================
FILE: .github/workflows/typescript.yml
================================================
name: TypeScript
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Install dependencies
run: yarn
- name: Expand liquid
run: CI=1 yarn expand-liquid typescript
- name: Install workspace dependencies
run: yarn
- name: Generate types
run: yarn typegen
- name: Test
run: yarn workspaces run test run
================================================
FILE: .gitignore
================================================
node_modules
**/target/
*.wasm
.env
.DS_Store
.yalc
yarn.lock
# These files are generated from Shopify CLI templating and should not be committed to this repo
## Extensions
**/input.graphql
*/rust/**/Cargo.lock
*/rust/**/Cargo.toml
**/shopify.extension.toml
*/javascript/**/package.json
*/javascript/**/src/*
*/typescript/**/package.json
*/typescript/**/src/*
*/rust/**/src/*.graphql
*/wasm/**/*.graphql
!*/wasm/**/schema.graphql
**/locales/*.json
!*/javascript/**/src/*.liquid
## Sample Apps
sample-apps/*/web/frontend/metafields.js
!sample-apps/discounts/web/frontend/metafields.js
sample-apps/*/build/*
sample-apps/*/public/build/*
!sample-apps/**/input.graphql
!sample-apps/**/shopify.extension.toml
!sample-apps/**/locales/*.json
dev.sqlite
================================================
FILE: .graphqlrc.cjs
================================================
/**
* Configures the GraphQL language server for all the function schemas in this repo.
*/
const fs = require('node:fs');
function getProjects(path) {
const projects = {}
const extensions = fs.readdirSync(`./${path}`);
for (const entry of extensions) {
const extensionPath = `./${path}/${entry}`;
const schema = `${extensionPath}/schema.graphql`;
if(!fs.existsSync(schema)) {
continue;
}
const projectName = extensionPath.substring(2).replaceAll('/', '-');
projects[projectName] = {
schema,
documents: `${extensionPath}/input.graphql`
}
}
return projects;
}
const projects = {
...getProjects("sample-apps/discounts/extensions"),
...getProjects("sample-apps/payment-customizations/extensions"),
...getProjects("sample-apps/delivery-customizations/extensions"),
...getProjects("checkout/rust/delivery-customization"),
...getProjects("checkout/rust/payment-customization"),
...getProjects("checkout/javascript/delivery-customization"),
...getProjects("checkout/javascript/payment-customization"),
...getProjects("checkout/javascript/cart-checkout-validation"),
...getProjects("discounts/rust/order-discounts"),
...getProjects("discounts/rust/product-discounts"),
...getProjects("discounts/rust/shipping-discounts"),
}
module.exports = {
projects
};
================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
================================================
FILE: Cargo.toml
================================================
[workspace]
members = [
"*/rust/*/*",
"sample-apps/*/extensions/*",
]
exclude = [
# Excludes do not support globbing -- https://github.com/rust-lang/cargo/issues/11405
"sample-apps/delivery-customizations/extensions/delivery-customization-js",
"sample-apps/discounts/extensions/product-discount-js",
"sample-apps/payment-customizations/extensions/payment-customization-js/",
"sample-apps/bundles-cart-transform/extensions/cart-expand-js/",
"sample-apps/bundles-price-per-component/extensions/price-per-component-js",
"sample-apps/optional-add-ons-cart-transform/extensions/optional-add-ons-js",
"sample-apps/update-line-item/extensions/update-line-item-js",
]
================================================
FILE: LICENSE.md
================================================
Copyright 2021-present, Shopify Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# 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.
```shell
yarn
yarn expand-liquid
# optionally provide the language flavor
yarn expand-liquid vanilla-js
yarn expand-liquid typescript
```
### Run Tests
```shell
# JavaScript
yarn test-js
# TypeScript
yarn test-ts
# Rust
cargo test
```
### Lint
```shell
# currently only applies to Rust
cargo fmt
cargo clippy -- -D warnings
```
================================================
FILE: checkout/javascript/cart-checkout-validation/default/.gitignore
================================================
dist
generated
================================================
FILE: checkout/javascript/cart-checkout-validation/default/locales/en.default.json.liquid
================================================
{
"name": "{{name}}",
"description": "{{name}}"
}
================================================
FILE: checkout/javascript/cart-checkout-validation/default/package.json.liquid
================================================
{
"name": "{{handle}}",
"version": "0.0.1",
"license": "UNLICENSED",
"scripts": {
"shopify": "npm exec -- shopify",
"typegen": "npm exec -- shopify app function typegen",
"build": "npm exec -- shopify app function build",
"preview": "npm exec -- shopify app function run",
"test": "vitest run",
"test:watch": "vitest watch"
},
"codegen": {
"schema": "schema.graphql",
"documents": "src/*.graphql",
"generates": {
"./generated/api.ts": {
"plugins": [
"typescript",
"typescript-operations"
]
}
},
"config": {
"omitOperationSuffix": true
}
},
"devDependencies": {
"vitest": "^0.29.8"
},
"dependencies": {
"@shopify/shopify_function": "~1.0.0"
}
}
================================================
FILE: checkout/javascript/cart-checkout-validation/default/schema.graphql
================================================
schema {
query: Input
mutation: MutationRoot
}
"""
Only allow the field to be queried when targeting one of the specified targets.
"""
directive @restrictTarget(only: [String!]!) on FIELD_DEFINITION
"""
Scale the Functions resource limits based on the field's length.
"""
directive @scaleLimits(rate: Float!) on FIELD_DEFINITION
"""
A custom property. Attributes are used to store additional information about a Shopify resource, such as
products, customers, or orders. Attributes are stored as key-value pairs.
For example, a list of attributes might include whether a customer is a first-time buyer (`"customer_first_order": "true"`),
whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred delivery date
(`"preferred_delivery_date": "2025-10-01"`), the discount applied (`"loyalty_discount_applied": "10%"`), and any
notes provided by the customer (`"customer_notes": "Please leave at the front door"`).
"""
type Attribute {
"""
The key or name of the attribute. For example, `"customer_first_order"`.
"""
key: String!
"""
The value of the attribute. For example, `"true"`.
"""
value: String
}
"""
Information about the customer that's interacting with the cart. It includes details such as the
customer's email and phone number, and the total amount of money the customer has spent in the store.
This information helps personalize the checkout experience and ensures that accurate pricing and delivery options
are displayed to customers.
"""
type BuyerIdentity {
"""
The customer that's interacting with the cart. A customer is a buyer who has an
[account](https://help.shopify.com/manual/customers/customer-accounts) with the store.
"""
customer: Customer
"""
The email address of the customer that's interacting with the cart.
"""
email: String
"""
Whether the customer is authenticated through their
[customer account](https://help.shopify.com/manual/customers/customer-accounts).
If the customer is authenticated, then the `customer` field returns the customer's information.
If the customer isn't authenticated, then the `customer` field returns `null`.
"""
isAuthenticated: Boolean!
"""
The phone number of the customer that's interacting with the cart.
"""
phone: String
"""
The company of a B2B customer that's interacting with the cart.
Used to manage and track purchases made by businesses rather than individual customers.
"""
purchasingCompany: PurchasingCompany
}
type BuyerJourney {
step: BuyerJourneyStep
}
"""
A specific stage in the customer's purchasing journey that indicates where the customer is in the checkout
process.
"""
enum BuyerJourneyStep {
"""
The customer is interacting with the cart. For example, the customer is adding items to the cart
or removing items from the cart.
"""
CART_INTERACTION
"""
The customer is completing checkout. For example, the customer is reviewing their order before
finalizing the purchase.
"""
CHECKOUT_COMPLETION
"""
The customer is interacting with checkout. For example, the customer is adding their shipping
address or payment information.
"""
CHECKOUT_INTERACTION
}
"""
The cart where the Function is running. A cart contains the merchandise that a customer intends to purchase
and information about the customer, such as the customer's email address and phone number.
"""
type Cart {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
Information about the customer that's interacting with the cart. It includes details such as the
customer's email and phone number, and the total amount of money the customer has spent in the store.
This information helps personalize the checkout experience and ensures that accurate pricing and delivery options
are displayed to customers.
"""
buyerIdentity: BuyerIdentity
"""
A breakdown of the costs that the customer will pay at checkout. It includes the total amount,
the subtotal before taxes and duties, the tax amount, and duty charges.
"""
cost: CartCost!
"""
The items in a cart that are eligible for fulfillment and can be delivered to the customer.
"""
deliverableLines: [DeliverableCartLine!]!
"""
A collection of items that are grouped by shared delivery characteristics. Delivery groups streamline
fulfillment by organizing items that can be shipped together, based on the customer's
shipping address. For example, if a customer orders a t-shirt and a pair of shoes that can be shipped
together, then the items are included in the same delivery group.
In the [Order Discount](https://shopify.dev/docs/api/functions/reference/order-discounts) and
[Product Discount](https://shopify.dev/docs/api/functions/reference/product-discounts) legacy APIs,
the `cart.deliveryGroups` input is always an empty array. This means you can't access delivery groups when
creating Order Discount or Product Discount Functions. If you need to apply discounts to shipping costs,
then use the [Discount Function API](https://shopify.dev/docs/api/functions/reference/discount)
instead.
"""
deliveryGroups: [CartDeliveryGroup!]!
"""
The items in a cart that the customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
lines: [CartLine!]! @scaleLimits(rate: 0.005)
"""
The additional fields on the **Cart** page that are required for international orders in specific countries,
such as customs information or tax identification numbers.
"""
localizedFields(
"""
The keys of the localized fields to retrieve.
"""
keys: [LocalizedFieldKey!]! = []
): [LocalizedField!]!
}
"""
A breakdown of the costs that the customer will pay at checkout. It includes the total amount,
the subtotal before taxes and duties, the tax amount, and duty charges.
"""
type CartCost {
"""
The amount for the customer to pay at checkout, excluding taxes and discounts.
"""
subtotalAmount: MoneyV2!
"""
The total amount for the customer to pay at checkout.
"""
totalAmount: MoneyV2!
"""
The duty charges for a customer to pay at checkout.
"""
totalDutyAmount: MoneyV2
"""
The total tax amount for the customer to pay at checkout.
"""
totalTaxAmount: MoneyV2
}
"""
Information about items in a cart that are grouped by shared delivery characteristics.
Delivery groups streamline fulfillment by organizing items that can be shipped together, based on the customer's
shipping address. For example, if a customer orders a t-shirt and a pair of shoes that can be shipped
together, then the items are included in the same delivery group.
"""
type CartDeliveryGroup {
"""
Information about items in a cart that a customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
cartLines: [CartLine!]! @scaleLimits(rate: 0.005)
"""
The shipping or destination address associated with the delivery group.
"""
deliveryAddress: MailingAddress
"""
The delivery options available for the delivery group. Delivery options are the different ways that customers
can choose to have their orders shipped. Examples include express shipping or standard shipping.
"""
deliveryOptions: [CartDeliveryOption!]!
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the delivery group.
"""
id: ID!
"""
Information about the delivery option that the customer has selected.
"""
selectedDeliveryOption: CartDeliveryOption
}
"""
Information about a delivery option that's available for an item in a cart. Delivery options are the different
ways that customers can choose to have their orders shipped. Examples include express shipping or standard
shipping.
"""
type CartDeliveryOption {
"""
A unique identifier that represents the delivery option offered to customers.
For example, `Canada Post Expedited`.
"""
code: String
"""
The amount that the customer pays if they select the delivery option.
"""
cost: MoneyV2!
"""
The delivery method associated with the delivery option. A delivery method is a way that merchants can
fulfill orders from their online stores. Delivery methods include shipping to an address,
[local pickup](https://help.shopify.com/manual/fulfillment/setup/delivery-methods/pickup-in-store),
and shipping to a [pickup point](https://help.shopify.com/manual/fulfillment/shopify-shipping/pickup-points),
all of which are natively supported by Shopify checkout.
"""
deliveryMethodType: DeliveryMethod!
"""
A single-line description of the delivery option, with HTML tags removed.
"""
description: String
"""
A unique, human-readable identifier of the delivery option's title.
A handle can contain letters, hyphens (`-`), and numbers, but not spaces.
For example, `standard-shipping`.
"""
handle: Handle!
"""
The name of the delivery option that displays to customers. The title is used to construct the delivery
option's handle. For example, if a delivery option is titled "Standard Shipping", then the handle is
`standard-shipping`.
"""
title: String
}
"""
Information about an item in a cart that a customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
type CartLine {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
Cart line attributes are equivalent to the
[`line_item`](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
object in Liquid.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
The cost of an item in a cart that the customer intends to purchase. Cart lines are entries in the customer's
cart that represent a single unit of a product variant. For example, if a customer adds two different sizes of
the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
cost: CartLineCost!
"""
The ID of the cart line.
"""
id: ID!
"""
The item that the customer intends to purchase.
"""
merchandise: Merchandise!
"""
The quantity of the item that the customer intends to purchase.
"""
quantity: Int!
"""
The [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
associated with the cart line, including information about how a product variant can be sold and purchased.
"""
sellingPlanAllocation: SellingPlanAllocation
}
"""
The cost of an item in a cart that the customer intends to purchase. Cart lines are entries in the customer's
cart that represent a single unit of a product variant. For example, if a customer adds two different sizes of
the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
type CartLineCost {
"""
The cost of a single unit. For example, if a customer purchases three units of a product
that are priced at $10 each, then the `amountPerQuantity` is $10.
"""
amountPerQuantity: MoneyV2!
"""
The cost of a single unit before any discounts are applied. This field is used to calculate and display
savings for customers. For example, if a product's `compareAtAmountPerQuantity` is $25 and its current price
is $20, then the customer sees a $5 discount. This value can change based on the buyer's identity and is
`null` when the value is hidden from buyers.
"""
compareAtAmountPerQuantity: MoneyV2
"""
The cost of items in the cart before applying any discounts to certain items.
This amount serves as the starting point for calculating any potential savings customers
might receive through promotions or discounts.
"""
subtotalAmount: MoneyV2!
"""
The total cost of items in a cart.
"""
totalAmount: MoneyV2!
}
"""
Whether the product is in the specified collection.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
type CollectionMembership {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the collection.
"""
collectionId: ID!
"""
Whether the product is in the specified collection.
"""
isMember: Boolean!
}
"""
Represents information about a company which is also a customer of the shop.
"""
type Company implements HasMetafields {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify.
"""
createdAt: DateTime!
"""
A unique externally-supplied ID for the company.
"""
externalId: String
"""
The ID of the company.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the company.
"""
name: String!
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified.
"""
updatedAt: DateTime!
}
"""
A company's main point of contact.
"""
type CompanyContact {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company contact was created in Shopify.
"""
createdAt: DateTime!
"""
The ID of the company.
"""
id: ID!
"""
The company contact's locale (language).
"""
locale: String
"""
The company contact's job title.
"""
title: String
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company contact was last modified.
"""
updatedAt: DateTime!
}
"""
A company's location.
"""
type CompanyLocation implements HasMetafields {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company location was created in Shopify.
"""
createdAt: DateTime!
"""
A unique externally-supplied ID for the company.
"""
externalId: String
"""
The ID of the company.
"""
id: ID!
"""
The preferred locale of the company location.
"""
locale: String
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the company location.
"""
name: String!
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company location was last modified.
"""
updatedAt: DateTime!
}
"""
The country for which the store is customized, reflecting local preferences and regulations.
Localization might influence the language, currency, and product offerings available in a store to enhance
the shopping experience for customers in that region.
"""
type Country {
"""
The ISO code of the country.
"""
isoCode: CountryCode!
}
"""
The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines.
If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision
of another country. For example, the territories associated with Spain are represented by the country code `ES`,
and the territories associated with the United States of America are represented by the country code `US`.
"""
enum CountryCode {
"""
Ascension Island.
"""
AC
"""
Andorra.
"""
AD
"""
United Arab Emirates.
"""
AE
"""
Afghanistan.
"""
AF
"""
Antigua & Barbuda.
"""
AG
"""
Anguilla.
"""
AI
"""
Albania.
"""
AL
"""
Armenia.
"""
AM
"""
Netherlands Antilles.
"""
AN
"""
Angola.
"""
AO
"""
Argentina.
"""
AR
"""
Austria.
"""
AT
"""
Australia.
"""
AU
"""
Aruba.
"""
AW
"""
Åland Islands.
"""
AX
"""
Azerbaijan.
"""
AZ
"""
Bosnia & Herzegovina.
"""
BA
"""
Barbados.
"""
BB
"""
Bangladesh.
"""
BD
"""
Belgium.
"""
BE
"""
Burkina Faso.
"""
BF
"""
Bulgaria.
"""
BG
"""
Bahrain.
"""
BH
"""
Burundi.
"""
BI
"""
Benin.
"""
BJ
"""
St. Barthélemy.
"""
BL
"""
Bermuda.
"""
BM
"""
Brunei.
"""
BN
"""
Bolivia.
"""
BO
"""
Caribbean Netherlands.
"""
BQ
"""
Brazil.
"""
BR
"""
Bahamas.
"""
BS
"""
Bhutan.
"""
BT
"""
Bouvet Island.
"""
BV
"""
Botswana.
"""
BW
"""
Belarus.
"""
BY
"""
Belize.
"""
BZ
"""
Canada.
"""
CA
"""
Cocos (Keeling) Islands.
"""
CC
"""
Congo - Kinshasa.
"""
CD
"""
Central African Republic.
"""
CF
"""
Congo - Brazzaville.
"""
CG
"""
Switzerland.
"""
CH
"""
Côte d’Ivoire.
"""
CI
"""
Cook Islands.
"""
CK
"""
Chile.
"""
CL
"""
Cameroon.
"""
CM
"""
China.
"""
CN
"""
Colombia.
"""
CO
"""
Costa Rica.
"""
CR
"""
Cuba.
"""
CU
"""
Cape Verde.
"""
CV
"""
Curaçao.
"""
CW
"""
Christmas Island.
"""
CX
"""
Cyprus.
"""
CY
"""
Czechia.
"""
CZ
"""
Germany.
"""
DE
"""
Djibouti.
"""
DJ
"""
Denmark.
"""
DK
"""
Dominica.
"""
DM
"""
Dominican Republic.
"""
DO
"""
Algeria.
"""
DZ
"""
Ecuador.
"""
EC
"""
Estonia.
"""
EE
"""
Egypt.
"""
EG
"""
Western Sahara.
"""
EH
"""
Eritrea.
"""
ER
"""
Spain.
"""
ES
"""
Ethiopia.
"""
ET
"""
Finland.
"""
FI
"""
Fiji.
"""
FJ
"""
Falkland Islands.
"""
FK
"""
Faroe Islands.
"""
FO
"""
France.
"""
FR
"""
Gabon.
"""
GA
"""
United Kingdom.
"""
GB
"""
Grenada.
"""
GD
"""
Georgia.
"""
GE
"""
French Guiana.
"""
GF
"""
Guernsey.
"""
GG
"""
Ghana.
"""
GH
"""
Gibraltar.
"""
GI
"""
Greenland.
"""
GL
"""
Gambia.
"""
GM
"""
Guinea.
"""
GN
"""
Guadeloupe.
"""
GP
"""
Equatorial Guinea.
"""
GQ
"""
Greece.
"""
GR
"""
South Georgia & South Sandwich Islands.
"""
GS
"""
Guatemala.
"""
GT
"""
Guinea-Bissau.
"""
GW
"""
Guyana.
"""
GY
"""
Hong Kong SAR.
"""
HK
"""
Heard & McDonald Islands.
"""
HM
"""
Honduras.
"""
HN
"""
Croatia.
"""
HR
"""
Haiti.
"""
HT
"""
Hungary.
"""
HU
"""
Indonesia.
"""
ID
"""
Ireland.
"""
IE
"""
Israel.
"""
IL
"""
Isle of Man.
"""
IM
"""
India.
"""
IN
"""
British Indian Ocean Territory.
"""
IO
"""
Iraq.
"""
IQ
"""
Iran.
"""
IR
"""
Iceland.
"""
IS
"""
Italy.
"""
IT
"""
Jersey.
"""
JE
"""
Jamaica.
"""
JM
"""
Jordan.
"""
JO
"""
Japan.
"""
JP
"""
Kenya.
"""
KE
"""
Kyrgyzstan.
"""
KG
"""
Cambodia.
"""
KH
"""
Kiribati.
"""
KI
"""
Comoros.
"""
KM
"""
St. Kitts & Nevis.
"""
KN
"""
North Korea.
"""
KP
"""
South Korea.
"""
KR
"""
Kuwait.
"""
KW
"""
Cayman Islands.
"""
KY
"""
Kazakhstan.
"""
KZ
"""
Laos.
"""
LA
"""
Lebanon.
"""
LB
"""
St. Lucia.
"""
LC
"""
Liechtenstein.
"""
LI
"""
Sri Lanka.
"""
LK
"""
Liberia.
"""
LR
"""
Lesotho.
"""
LS
"""
Lithuania.
"""
LT
"""
Luxembourg.
"""
LU
"""
Latvia.
"""
LV
"""
Libya.
"""
LY
"""
Morocco.
"""
MA
"""
Monaco.
"""
MC
"""
Moldova.
"""
MD
"""
Montenegro.
"""
ME
"""
St. Martin.
"""
MF
"""
Madagascar.
"""
MG
"""
North Macedonia.
"""
MK
"""
Mali.
"""
ML
"""
Myanmar (Burma).
"""
MM
"""
Mongolia.
"""
MN
"""
Macao SAR.
"""
MO
"""
Martinique.
"""
MQ
"""
Mauritania.
"""
MR
"""
Montserrat.
"""
MS
"""
Malta.
"""
MT
"""
Mauritius.
"""
MU
"""
Maldives.
"""
MV
"""
Malawi.
"""
MW
"""
Mexico.
"""
MX
"""
Malaysia.
"""
MY
"""
Mozambique.
"""
MZ
"""
Namibia.
"""
NA
"""
New Caledonia.
"""
NC
"""
Niger.
"""
NE
"""
Norfolk Island.
"""
NF
"""
Nigeria.
"""
NG
"""
Nicaragua.
"""
NI
"""
Netherlands.
"""
NL
"""
Norway.
"""
NO
"""
Nepal.
"""
NP
"""
Nauru.
"""
NR
"""
Niue.
"""
NU
"""
New Zealand.
"""
NZ
"""
Oman.
"""
OM
"""
Panama.
"""
PA
"""
Peru.
"""
PE
"""
French Polynesia.
"""
PF
"""
Papua New Guinea.
"""
PG
"""
Philippines.
"""
PH
"""
Pakistan.
"""
PK
"""
Poland.
"""
PL
"""
St. Pierre & Miquelon.
"""
PM
"""
Pitcairn Islands.
"""
PN
"""
Palestinian Territories.
"""
PS
"""
Portugal.
"""
PT
"""
Paraguay.
"""
PY
"""
Qatar.
"""
QA
"""
Réunion.
"""
RE
"""
Romania.
"""
RO
"""
Serbia.
"""
RS
"""
Russia.
"""
RU
"""
Rwanda.
"""
RW
"""
Saudi Arabia.
"""
SA
"""
Solomon Islands.
"""
SB
"""
Seychelles.
"""
SC
"""
Sudan.
"""
SD
"""
Sweden.
"""
SE
"""
Singapore.
"""
SG
"""
St. Helena.
"""
SH
"""
Slovenia.
"""
SI
"""
Svalbard & Jan Mayen.
"""
SJ
"""
Slovakia.
"""
SK
"""
Sierra Leone.
"""
SL
"""
San Marino.
"""
SM
"""
Senegal.
"""
SN
"""
Somalia.
"""
SO
"""
Suriname.
"""
SR
"""
South Sudan.
"""
SS
"""
São Tomé & Príncipe.
"""
ST
"""
El Salvador.
"""
SV
"""
Sint Maarten.
"""
SX
"""
Syria.
"""
SY
"""
Eswatini.
"""
SZ
"""
Tristan da Cunha.
"""
TA
"""
Turks & Caicos Islands.
"""
TC
"""
Chad.
"""
TD
"""
French Southern Territories.
"""
TF
"""
Togo.
"""
TG
"""
Thailand.
"""
TH
"""
Tajikistan.
"""
TJ
"""
Tokelau.
"""
TK
"""
Timor-Leste.
"""
TL
"""
Turkmenistan.
"""
TM
"""
Tunisia.
"""
TN
"""
Tonga.
"""
TO
"""
Türkiye.
"""
TR
"""
Trinidad & Tobago.
"""
TT
"""
Tuvalu.
"""
TV
"""
Taiwan.
"""
TW
"""
Tanzania.
"""
TZ
"""
Ukraine.
"""
UA
"""
Uganda.
"""
UG
"""
U.S. Outlying Islands.
"""
UM
"""
United States.
"""
US
"""
Uruguay.
"""
UY
"""
Uzbekistan.
"""
UZ
"""
Vatican City.
"""
VA
"""
St. Vincent & Grenadines.
"""
VC
"""
Venezuela.
"""
VE
"""
British Virgin Islands.
"""
VG
"""
Vietnam.
"""
VN
"""
Vanuatu.
"""
VU
"""
Wallis & Futuna.
"""
WF
"""
Samoa.
"""
WS
"""
Kosovo.
"""
XK
"""
Yemen.
"""
YE
"""
Mayotte.
"""
YT
"""
South Africa.
"""
ZA
"""
Zambia.
"""
ZM
"""
Zimbabwe.
"""
ZW
"""
Unknown Region.
"""
ZZ
}
"""
The currency codes that represent the world currencies throughout the Admin API. Currency codes include
[standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, non-standard codes,
digital currency codes.
"""
enum CurrencyCode {
"""
United Arab Emirates Dirham (AED).
"""
AED
"""
Afghan Afghani (AFN).
"""
AFN
"""
Albanian Lek (ALL).
"""
ALL
"""
Armenian Dram (AMD).
"""
AMD
"""
Netherlands Antillean Guilder.
"""
ANG
"""
Angolan Kwanza (AOA).
"""
AOA
"""
Argentine Pesos (ARS).
"""
ARS
"""
Australian Dollars (AUD).
"""
AUD
"""
Aruban Florin (AWG).
"""
AWG
"""
Azerbaijani Manat (AZN).
"""
AZN
"""
Bosnia and Herzegovina Convertible Mark (BAM).
"""
BAM
"""
Barbadian Dollar (BBD).
"""
BBD
"""
Bangladesh Taka (BDT).
"""
BDT
"""
Bulgarian Lev (BGN).
"""
BGN
"""
Bahraini Dinar (BHD).
"""
BHD
"""
Burundian Franc (BIF).
"""
BIF
"""
Bermudian Dollar (BMD).
"""
BMD
"""
Brunei Dollar (BND).
"""
BND
"""
Bolivian Boliviano (BOB).
"""
BOB
"""
Brazilian Real (BRL).
"""
BRL
"""
Bahamian Dollar (BSD).
"""
BSD
"""
Bhutanese Ngultrum (BTN).
"""
BTN
"""
Botswana Pula (BWP).
"""
BWP
"""
Belarusian Ruble (BYN).
"""
BYN
"""
Belarusian Ruble (BYR).
"""
BYR @deprecated(reason: "Use `BYN` instead.")
"""
Belize Dollar (BZD).
"""
BZD
"""
Canadian Dollars (CAD).
"""
CAD
"""
Congolese franc (CDF).
"""
CDF
"""
Swiss Francs (CHF).
"""
CHF
"""
Chilean Peso (CLP).
"""
CLP
"""
Chinese Yuan Renminbi (CNY).
"""
CNY
"""
Colombian Peso (COP).
"""
COP
"""
Costa Rican Colones (CRC).
"""
CRC
"""
Cape Verdean escudo (CVE).
"""
CVE
"""
Czech Koruny (CZK).
"""
CZK
"""
Djiboutian Franc (DJF).
"""
DJF
"""
Danish Kroner (DKK).
"""
DKK
"""
Dominican Peso (DOP).
"""
DOP
"""
Algerian Dinar (DZD).
"""
DZD
"""
Egyptian Pound (EGP).
"""
EGP
"""
Eritrean Nakfa (ERN).
"""
ERN
"""
Ethiopian Birr (ETB).
"""
ETB
"""
Euro (EUR).
"""
EUR
"""
Fijian Dollars (FJD).
"""
FJD
"""
Falkland Islands Pounds (FKP).
"""
FKP
"""
United Kingdom Pounds (GBP).
"""
GBP
"""
Georgian Lari (GEL).
"""
GEL
"""
Ghanaian Cedi (GHS).
"""
GHS
"""
Gibraltar Pounds (GIP).
"""
GIP
"""
Gambian Dalasi (GMD).
"""
GMD
"""
Guinean Franc (GNF).
"""
GNF
"""
Guatemalan Quetzal (GTQ).
"""
GTQ
"""
Guyanese Dollar (GYD).
"""
GYD
"""
Hong Kong Dollars (HKD).
"""
HKD
"""
Honduran Lempira (HNL).
"""
HNL
"""
Croatian Kuna (HRK).
"""
HRK
"""
Haitian Gourde (HTG).
"""
HTG
"""
Hungarian Forint (HUF).
"""
HUF
"""
Indonesian Rupiah (IDR).
"""
IDR
"""
Israeli New Shekel (NIS).
"""
ILS
"""
Indian Rupees (INR).
"""
INR
"""
Iraqi Dinar (IQD).
"""
IQD
"""
Iranian Rial (IRR).
"""
IRR
"""
Icelandic Kronur (ISK).
"""
ISK
"""
Jersey Pound.
"""
JEP
"""
Jamaican Dollars (JMD).
"""
JMD
"""
Jordanian Dinar (JOD).
"""
JOD
"""
Japanese Yen (JPY).
"""
JPY
"""
Kenyan Shilling (KES).
"""
KES
"""
Kyrgyzstani Som (KGS).
"""
KGS
"""
Cambodian Riel.
"""
KHR
"""
Kiribati Dollar (KID).
"""
KID
"""
Comorian Franc (KMF).
"""
KMF
"""
South Korean Won (KRW).
"""
KRW
"""
Kuwaiti Dinar (KWD).
"""
KWD
"""
Cayman Dollars (KYD).
"""
KYD
"""
Kazakhstani Tenge (KZT).
"""
KZT
"""
Laotian Kip (LAK).
"""
LAK
"""
Lebanese Pounds (LBP).
"""
LBP
"""
Sri Lankan Rupees (LKR).
"""
LKR
"""
Liberian Dollar (LRD).
"""
LRD
"""
Lesotho Loti (LSL).
"""
LSL
"""
Lithuanian Litai (LTL).
"""
LTL
"""
Latvian Lati (LVL).
"""
LVL
"""
Libyan Dinar (LYD).
"""
LYD
"""
Moroccan Dirham.
"""
MAD
"""
Moldovan Leu (MDL).
"""
MDL
"""
Malagasy Ariary (MGA).
"""
MGA
"""
Macedonia Denar (MKD).
"""
MKD
"""
Burmese Kyat (MMK).
"""
MMK
"""
Mongolian Tugrik.
"""
MNT
"""
Macanese Pataca (MOP).
"""
MOP
"""
Mauritanian Ouguiya (MRU).
"""
MRU
"""
Mauritian Rupee (MUR).
"""
MUR
"""
Maldivian Rufiyaa (MVR).
"""
MVR
"""
Malawian Kwacha (MWK).
"""
MWK
"""
Mexican Pesos (MXN).
"""
MXN
"""
Malaysian Ringgits (MYR).
"""
MYR
"""
Mozambican Metical.
"""
MZN
"""
Namibian Dollar.
"""
NAD
"""
Nigerian Naira (NGN).
"""
NGN
"""
Nicaraguan Córdoba (NIO).
"""
NIO
"""
Norwegian Kroner (NOK).
"""
NOK
"""
Nepalese Rupee (NPR).
"""
NPR
"""
New Zealand Dollars (NZD).
"""
NZD
"""
Omani Rial (OMR).
"""
OMR
"""
Panamian Balboa (PAB).
"""
PAB
"""
Peruvian Nuevo Sol (PEN).
"""
PEN
"""
Papua New Guinean Kina (PGK).
"""
PGK
"""
Philippine Peso (PHP).
"""
PHP
"""
Pakistani Rupee (PKR).
"""
PKR
"""
Polish Zlotych (PLN).
"""
PLN
"""
Paraguayan Guarani (PYG).
"""
PYG
"""
Qatari Rial (QAR).
"""
QAR
"""
Romanian Lei (RON).
"""
RON
"""
Serbian dinar (RSD).
"""
RSD
"""
Russian Rubles (RUB).
"""
RUB
"""
Rwandan Franc (RWF).
"""
RWF
"""
Saudi Riyal (SAR).
"""
SAR
"""
Solomon Islands Dollar (SBD).
"""
SBD
"""
Seychellois Rupee (SCR).
"""
SCR
"""
Sudanese Pound (SDG).
"""
SDG
"""
Swedish Kronor (SEK).
"""
SEK
"""
Singapore Dollars (SGD).
"""
SGD
"""
Saint Helena Pounds (SHP).
"""
SHP
"""
Sierra Leonean Leone (SLL).
"""
SLL
"""
Somali Shilling (SOS).
"""
SOS
"""
Surinamese Dollar (SRD).
"""
SRD
"""
South Sudanese Pound (SSP).
"""
SSP
"""
Sao Tome And Principe Dobra (STD).
"""
STD @deprecated(reason: "Use `STN` instead.")
"""
Sao Tome And Principe Dobra (STN).
"""
STN
"""
Syrian Pound (SYP).
"""
SYP
"""
Swazi Lilangeni (SZL).
"""
SZL
"""
Thai baht (THB).
"""
THB
"""
Tajikistani Somoni (TJS).
"""
TJS
"""
Turkmenistani Manat (TMT).
"""
TMT
"""
Tunisian Dinar (TND).
"""
TND
"""
Tongan Pa'anga (TOP).
"""
TOP
"""
Turkish Lira (TRY).
"""
TRY
"""
Trinidad and Tobago Dollars (TTD).
"""
TTD
"""
Taiwan Dollars (TWD).
"""
TWD
"""
Tanzanian Shilling (TZS).
"""
TZS
"""
Ukrainian Hryvnia (UAH).
"""
UAH
"""
Ugandan Shilling (UGX).
"""
UGX
"""
United States Dollars (USD).
"""
USD
"""
United States Dollars Coin (USDC).
"""
USDC
"""
Uruguayan Pesos (UYU).
"""
UYU
"""
Uzbekistan som (UZS).
"""
UZS
"""
Venezuelan Bolivares (VED).
"""
VED
"""
Venezuelan Bolivares (VEF).
"""
VEF @deprecated(reason: "Use `VES` instead.")
"""
Venezuelan Bolivares Soberanos (VES).
"""
VES
"""
Vietnamese đồng (VND).
"""
VND
"""
Vanuatu Vatu (VUV).
"""
VUV
"""
Samoan Tala (WST).
"""
WST
"""
Central African CFA Franc (XAF).
"""
XAF
"""
East Caribbean Dollar (XCD).
"""
XCD
"""
West African CFA franc (XOF).
"""
XOF
"""
CFP Franc (XPF).
"""
XPF
"""
Unrecognized currency.
"""
XXX
"""
Yemeni Rial (YER).
"""
YER
"""
South African Rand (ZAR).
"""
ZAR
"""
Zambian Kwacha (ZMW).
"""
ZMW
}
"""
A custom product represents a product that doesn't map to Shopify's
[standard product categories](https://help.shopify.com/manual/products/details/product-type).
For example, you can use a custom product to manage gift cards, shipping requirements, localized product
information, or weight measurements and conversions.
"""
type CustomProduct {
"""
Whether the merchandise is a gift card.
"""
isGiftCard: Boolean!
"""
Whether the item needs to be shipped to the customer. For example, a
digital gift card doesn't need to be shipped, but a t-shirt does
need to be shipped.
"""
requiresShipping: Boolean!
"""
The localized name for the product that displays to customers. The title is used to construct the product's
handle, which is a unique, human-readable string of the product's title. For example, if a product is titled
"Black Sunglasses", then the handle is `black-sunglasses`.
"""
title: String!
"""
The product variant's weight, in the system of measurement set in the `weightUnit` field.
"""
weight: Float
"""
The unit of measurement for weight.
"""
weightUnit: WeightUnit!
}
"""
Represents a [customer](https://help.shopify.com/manual/customers/manage-customers)
who has an [account](https://help.shopify.com/manual/customers/customer-accounts) with the store.
`Customer` returns data including the customer's contact information and order history.
"""
type Customer implements HasMetafields {
"""
The total amount that the customer has spent on orders.
The amount is converted from the shop's currency to the currency of the cart using a market rate.
"""
amountSpent: MoneyV2!
"""
The full name of the customer, based on the values for `firstName` and `lastName`.
If `firstName` and `lastName` aren't specified, then the value is the customer's email address.
If the email address isn't specified, then the value is the customer's phone number.
"""
displayName: String!
"""
The customer's email address.
"""
email: String
"""
The customer's first name.
"""
firstName: String
"""
Whether the customer is associated with any of the specified tags. The customer must have at least one tag
from the list to return `true`.
"""
hasAnyTag(
"""
A comma-separated list of searchable keywords that are associated with the customer. For example,
`"VIP, Gold"` returns customers with either the `VIP` or `Gold` tag.
"""
tags: [String!]! = []
): Boolean!
"""
Whether the customer is associated with the specified tags. The customer must have all of the tags in the list
to return `true`.
"""
hasTags(
"""
A comma-separated list of searchable keywords that are associated with the customer. For example,
`"VIP, Gold"` returns customers with both the `VIP` and `Gold` tags.
"""
tags: [String!]! = []
): [HasTagResponse!]!
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the customer.
"""
id: ID!
"""
The customer's last name.
"""
lastName: String
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The total number of orders that the customer has made at the store.
"""
numberOfOrders: Int!
}
"""
Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string.
For example, September 7, 2019 is represented as `"2019-07-16"`.
"""
scalar Date
"""
Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string.
For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is
represented as `"2019-09-07T15:50:00Z`".
"""
scalar DateTime
"""
A subset of the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format that
includes the date and time but not the timezone which is determined from context.
For example, "2018-01-01T00:00:00".
"""
scalar DateTimeWithoutTimezone
"""
A signed decimal number, which supports arbitrary precision and is serialized as a string.
Example values: `"29.99"`, `"29.999"`.
"""
scalar Decimal
"""
Represents information about the merchandise in the cart.
"""
type DeliverableCartLine {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
Cart line attributes are equivalent to the
[`line_item`](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
object in Liquid.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
The ID of the cart line.
"""
id: ID!
"""
The item that the customer intends to purchase.
"""
merchandise: Merchandise!
"""
The quantity of the item that the customer intends to purchase.
"""
quantity: Int!
}
"""
List of different delivery method types.
"""
enum DeliveryMethod {
"""
Local Delivery.
"""
LOCAL
"""
None.
"""
NONE
"""
Shipping to a Pickup Point.
"""
PICKUP_POINT
"""
Local Pickup.
"""
PICK_UP
"""
Retail.
"""
RETAIL
"""
Shipping.
"""
SHIPPING
}
"""
A Function error for a path.
"""
input FunctionError {
"""
A description of the validation error. For example, "The product is out of stock" or
"The product isn't available for purchase in your region". The message is localized for the customer.
"""
localizedMessage: String!
"""
The [identifier](https://shopify.dev/docs/api/functions/reference/cart-checkout-validation/graphql#supported-checkout-field-targets)
in `shopify.extension.toml` that specifies where you're injecting code in the checkout process.
"""
target: String!
}
"""
The fetch target result. Your Function must return this data structure when generating the request.
"""
input FunctionFetchResult {
"""
The attributes associated with an HTTP request.
"""
request: HttpRequest
}
"""
The output of the Function run target. The object contains the validation errors
that display to customers and prevent them from proceeding through checkout. In
API versions 2023-10 and beyond, this type is deprecated in favor of
`FunctionRunResult`.
"""
input FunctionResult {
"""
The validation errors that block a customer from proceeding through checkout.
"""
errors: [FunctionError!]!
}
"""
The output of the Function run target. The object contains the validation errors
that display to customers and prevent them from proceeding through checkout.
"""
input FunctionRunResult {
"""
The validation errors that block a customer from proceeding through checkout.
"""
errors: [FunctionError!]!
}
"""
A function-scoped handle to a refer a resource.
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"10079785100"`
"""
scalar Handle
"""
Represents information about the metafields associated to the specified resource.
"""
interface HasMetafields {
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
}
"""
Whether a Shopify resource, such as a product or customer, has a specified tag.
"""
type HasTagResponse {
"""
Whether the Shopify resource has the tag.
"""
hasTag: Boolean!
"""
A searchable keyword that's associated with a Shopify resource, such as a product or customer. For example,
a merchant might apply the `sports` and `summer` tags to products that are associated with sportswear for
summer.
"""
tag: String!
}
"""
The attributes associated with an HTTP request.
"""
input HttpRequest {
"""
The HTTP request body as a plain string.
Use this field when the body isn't in JSON format.
"""
body: String
"""
The HTTP headers.
"""
headers: [HttpRequestHeader!]!
"""
The HTTP request body as a JSON object.
Use this field when the body's in JSON format, to reduce function instruction consumption
and to ensure the body's formatted in logs.
Don't use this field together with the `body` field. If both are provided, then the `body` field
will take precedence.
If this field is specified and no `Content-Type` header is included, then the header will
automatically be set to `application/json`.
"""
jsonBody: JSON
"""
The HTTP method.
"""
method: HttpRequestMethod!
"""
Policy attached to the HTTP request.
"""
policy: HttpRequestPolicy!
"""
The HTTP url (eg.: https://example.com). The scheme needs to be HTTPS.
"""
url: URL!
}
"""
The attributes associated with an HTTP request header.
"""
input HttpRequestHeader {
"""
Header name.
"""
name: String!
"""
Header value.
"""
value: String!
}
"""
The HTTP request available methods.
"""
enum HttpRequestMethod {
"""
Http GET.
"""
GET
"""
Http POST.
"""
POST
}
"""
The attributes associated with an HTTP request policy.
"""
input HttpRequestPolicy {
"""
Read timeout in milliseconds.
"""
readTimeoutMs: Int!
}
"""
The attributes associated with an HTTP response.
"""
type HttpResponse {
"""
The HTTP response body as a plain string.
Use this field when the body is not in JSON format.
"""
body: String
"""
An HTTP header.
"""
header(
"""
A case-insensitive header name.
"""
name: String!
): HttpResponseHeader
"""
The HTTP headers.
"""
headers: [HttpResponseHeader!]! @deprecated(reason: "Use `header` instead.")
"""
The HTTP response body parsed as JSON.
If the body is valid JSON, it will be parsed and returned as a JSON object.
If parsing fails, then raw body is returned as a string.
Use this field when you expect the response to be JSON, or when you're dealing
with mixed response types, meaning both JSON and non-JSON.
Using this field reduces function instruction consumption and ensures that the data is formatted in logs.
To prevent increasing the function target input size unnecessarily, avoid querying
both `body` and `jsonBody` simultaneously.
"""
jsonBody: JSON
"""
The HTTP status code.
"""
status: Int!
}
"""
The attributes associated with an HTTP response header.
"""
type HttpResponseHeader {
"""
Header name.
"""
name: String!
"""
Header value.
"""
value: String!
}
"""
Represents a unique identifier, often used to refetch an object.
The ID type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"gid://shopify/Product/10079785100"`
"""
scalar ID
"""
The `Input` object is the complete GraphQL schema that your Function can receive
as input to validate cart and checkout. Your Function receives only the fields
that you request in the input query. To optimize performance, we highly
recommend that you request only the fields that your Function requires.
"""
type Input {
"""
Information about the current step in the buyer's purchasing process. The
buyer journey helps you determine where the customer is in their shopping
experience (for example, cart interaction, checkout interaction, or completing
a checkout). You can use this information to apply appropriate validation
rules based on the customer's current context and create a more tailored and
performant shopping experience.
"""
buyerJourney: BuyerJourney!
"""
The cart where the Function is running. A cart contains the merchandise that a customer intends to purchase
and information about the customer, such as the customer's email address and phone number.
"""
cart: Cart!
"""
The `FunctionFetchResult` object is the result of the fetch target. This is
the response that Shopify returns after executing the HTTP request defined in
your fetch target, and that is passed as input to the run target. For more
information, refer to [network access for Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/network-access).
"""
fetchResult: HttpResponse @restrictTarget(only: ["purchase.validation.run"])
"""
The regional and language settings that determine how the Function
handles currency, numbers, dates, and other locale-specific values
during discount calculations. These settings are based on the store's configured
[localization practices](https://shopify.dev/docs/apps/build/functions/localization-practices-shopify-functions).
"""
localization: Localization!
"""
The exchange rate used to convert discounts between the shop's default
currency and the currency that displays to the customer during checkout.
For example, if a store operates in USD but a customer is viewing discounts in EUR,
then the presentment currency rate handles this conversion for accurate pricing.
"""
presentmentCurrencyRate: Decimal!
"""
Information about the shop where the Function is running, including the shop's timezone
setting and associated [metafields](https://shopify.dev/docs/apps/build/custom-data).
"""
shop: Shop!
"""
The configuration of the app that owns the Function. This configuration
controls how merchants can define validation rules for carts and checkout,
such as inventory checks, price validations, or custom purchase restrictions.
"""
validation: Validation!
}
"""
A [JSON](https://www.json.org/json-en.html) object.
Example value:
`{
"product": {
"id": "gid://shopify/Product/1346443542550",
"title": "White T-shirt",
"options": [{
"name": "Size",
"values": ["M", "L"]
}]
}
}`
"""
scalar JSON
"""
The language for which the store is customized, ensuring content is tailored to local customers.
This includes product descriptions and customer communications that resonate with the target audience.
"""
type Language {
"""
The ISO code.
"""
isoCode: LanguageCode!
}
"""
Language codes supported by Shopify.
"""
enum LanguageCode {
"""
Afrikaans.
"""
AF
"""
Akan.
"""
AK
"""
Amharic.
"""
AM
"""
Arabic.
"""
AR
"""
Assamese.
"""
AS
"""
Azerbaijani.
"""
AZ
"""
Belarusian.
"""
BE
"""
Bulgarian.
"""
BG
"""
Bambara.
"""
BM
"""
Bangla.
"""
BN
"""
Tibetan.
"""
BO
"""
Breton.
"""
BR
"""
Bosnian.
"""
BS
"""
Catalan.
"""
CA
"""
Chechen.
"""
CE
"""
Central Kurdish.
"""
CKB
"""
Czech.
"""
CS
"""
Church Slavic.
"""
CU
"""
Welsh.
"""
CY
"""
Danish.
"""
DA
"""
German.
"""
DE
"""
Dzongkha.
"""
DZ
"""
Ewe.
"""
EE
"""
Greek.
"""
EL
"""
English.
"""
EN
"""
Esperanto.
"""
EO
"""
Spanish.
"""
ES
"""
Estonian.
"""
ET
"""
Basque.
"""
EU
"""
Persian.
"""
FA
"""
Fulah.
"""
FF
"""
Finnish.
"""
FI
"""
Filipino.
"""
FIL
"""
Faroese.
"""
FO
"""
French.
"""
FR
"""
Western Frisian.
"""
FY
"""
Irish.
"""
GA
"""
Scottish Gaelic.
"""
GD
"""
Galician.
"""
GL
"""
Gujarati.
"""
GU
"""
Manx.
"""
GV
"""
Hausa.
"""
HA
"""
Hebrew.
"""
HE
"""
Hindi.
"""
HI
"""
Croatian.
"""
HR
"""
Hungarian.
"""
HU
"""
Armenian.
"""
HY
"""
Interlingua.
"""
IA
"""
Indonesian.
"""
ID
"""
Igbo.
"""
IG
"""
Sichuan Yi.
"""
II
"""
Icelandic.
"""
IS
"""
Italian.
"""
IT
"""
Japanese.
"""
JA
"""
Javanese.
"""
JV
"""
Georgian.
"""
KA
"""
Kikuyu.
"""
KI
"""
Kazakh.
"""
KK
"""
Kalaallisut.
"""
KL
"""
Khmer.
"""
KM
"""
Kannada.
"""
KN
"""
Korean.
"""
KO
"""
Kashmiri.
"""
KS
"""
Kurdish.
"""
KU
"""
Cornish.
"""
KW
"""
Kyrgyz.
"""
KY
"""
Luxembourgish.
"""
LB
"""
Ganda.
"""
LG
"""
Lingala.
"""
LN
"""
Lao.
"""
LO
"""
Lithuanian.
"""
LT
"""
Luba-Katanga.
"""
LU
"""
Latvian.
"""
LV
"""
Malagasy.
"""
MG
"""
Māori.
"""
MI
"""
Macedonian.
"""
MK
"""
Malayalam.
"""
ML
"""
Mongolian.
"""
MN
"""
Marathi.
"""
MR
"""
Malay.
"""
MS
"""
Maltese.
"""
MT
"""
Burmese.
"""
MY
"""
Norwegian (Bokmål).
"""
NB
"""
North Ndebele.
"""
ND
"""
Nepali.
"""
NE
"""
Dutch.
"""
NL
"""
Norwegian Nynorsk.
"""
NN
"""
Norwegian.
"""
NO
"""
Oromo.
"""
OM
"""
Odia.
"""
OR
"""
Ossetic.
"""
OS
"""
Punjabi.
"""
PA
"""
Polish.
"""
PL
"""
Pashto.
"""
PS
"""
Portuguese.
"""
PT
"""
Portuguese (Brazil).
"""
PT_BR
"""
Portuguese (Portugal).
"""
PT_PT
"""
Quechua.
"""
QU
"""
Romansh.
"""
RM
"""
Rundi.
"""
RN
"""
Romanian.
"""
RO
"""
Russian.
"""
RU
"""
Kinyarwanda.
"""
RW
"""
Sanskrit.
"""
SA
"""
Sardinian.
"""
SC
"""
Sindhi.
"""
SD
"""
Northern Sami.
"""
SE
"""
Sango.
"""
SG
"""
Sinhala.
"""
SI
"""
Slovak.
"""
SK
"""
Slovenian.
"""
SL
"""
Shona.
"""
SN
"""
Somali.
"""
SO
"""
Albanian.
"""
SQ
"""
Serbian.
"""
SR
"""
Sundanese.
"""
SU
"""
Swedish.
"""
SV
"""
Swahili.
"""
SW
"""
Tamil.
"""
TA
"""
Telugu.
"""
TE
"""
Tajik.
"""
TG
"""
Thai.
"""
TH
"""
Tigrinya.
"""
TI
"""
Turkmen.
"""
TK
"""
Tongan.
"""
TO
"""
Turkish.
"""
TR
"""
Tatar.
"""
TT
"""
Uyghur.
"""
UG
"""
Ukrainian.
"""
UK
"""
Urdu.
"""
UR
"""
Uzbek.
"""
UZ
"""
Vietnamese.
"""
VI
"""
Volapük.
"""
VO
"""
Wolof.
"""
WO
"""
Xhosa.
"""
XH
"""
Yiddish.
"""
YI
"""
Yoruba.
"""
YO
"""
Chinese.
"""
ZH
"""
Chinese (Simplified).
"""
ZH_CN
"""
Chinese (Traditional).
"""
ZH_TW
"""
Zulu.
"""
ZU
}
"""
The current time based on the
[store's timezone setting](https://help.shopify.com/manual/intro-to-shopify/initial-setup/setup-business-settings).
"""
type LocalTime {
"""
The current date relative to the parent object.
"""
date: Date!
"""
Returns true if the current date and time is at or past the given date and time, and false otherwise.
"""
dateTimeAfter(
"""
The date and time to compare against, assumed to be in the timezone of the parent object.
"""
dateTime: DateTimeWithoutTimezone!
): Boolean!
"""
Returns true if the current date and time is before the given date and time, and false otherwise.
"""
dateTimeBefore(
"""
The date and time to compare against, assumed to be in the timezone of the parent timezone.
"""
dateTime: DateTimeWithoutTimezone!
): Boolean!
"""
Returns true if the current date and time is between the two given date and times, and false otherwise.
"""
dateTimeBetween(
"""
The upper bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
endDateTime: DateTimeWithoutTimezone!
"""
The lower bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
startDateTime: DateTimeWithoutTimezone!
): Boolean!
"""
Returns true if the current time is at or past the given time, and false otherwise.
"""
timeAfter(
"""
The time to compare against, assumed to be in the timezone of the parent timezone.
"""
time: TimeWithoutTimezone!
): Boolean!
"""
Returns true if the current time is at or past the given time, and false otherwise.
"""
timeBefore(
"""
The time to compare against, assumed to be in the timezone of the parent timezone.
"""
time: TimeWithoutTimezone!
): Boolean!
"""
Returns true if the current time is between the two given times, and false otherwise.
"""
timeBetween(
"""
The upper bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
endTime: TimeWithoutTimezone!
"""
The lower bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
startTime: TimeWithoutTimezone!
): Boolean!
}
"""
Details about the localized experience for the store in a specific region, including country and language
settings. The localized experience is determined by the store's settings and the customer's location.
Localization ensures that customers can access relevant content and options while browsing or purchasing
products in a store.
"""
type Localization {
"""
The country for which the store is customized, reflecting local preferences and regulations.
Localization might influence the language, currency, and product offerings available in a store to enhance
the shopping experience for customers in that region.
"""
country: Country!
"""
The language for which the store is customized, ensuring content is tailored to local customers.
This includes product descriptions and customer communications that resonate with the target audience.
"""
language: Language!
"""
The market of the active localized experience.
"""
market: Market!
}
"""
Represents the value captured by a localized field. Localized fields are
additional fields required by certain countries on international orders. For
example, some countries require additional fields for customs information or tax
identification numbers.
"""
type LocalizedField {
"""
The key of the localized field.
"""
key: LocalizedFieldKey!
"""
The title of the localized field.
"""
title: String!
"""
The value of the localized field.
"""
value: String
}
"""
Unique key identifying localized fields.
"""
enum LocalizedFieldKey {
"""
Localized field key 'shipping_credential_br' for country Brazil.
"""
SHIPPING_CREDENTIAL_BR
"""
Localized field key 'shipping_credential_cl' for country Chile.
"""
SHIPPING_CREDENTIAL_CL
"""
Localized field key 'shipping_credential_cn' for country China.
"""
SHIPPING_CREDENTIAL_CN
"""
Localized field key 'shipping_credential_co' for country Colombia.
"""
SHIPPING_CREDENTIAL_CO
"""
Localized field key 'shipping_credential_cr' for country Costa Rica.
"""
SHIPPING_CREDENTIAL_CR
"""
Localized field key 'shipping_credential_ec' for country Ecuador.
"""
SHIPPING_CREDENTIAL_EC
"""
Localized field key 'shipping_credential_es' for country Spain.
"""
SHIPPING_CREDENTIAL_ES
"""
Localized field key 'shipping_credential_gt' for country Guatemala.
"""
SHIPPING_CREDENTIAL_GT
"""
Localized field key 'shipping_credential_id' for country Indonesia.
"""
SHIPPING_CREDENTIAL_ID
"""
Localized field key 'shipping_credential_kr' for country South Korea.
"""
SHIPPING_CREDENTIAL_KR
"""
Localized field key 'shipping_credential_mx' for country Mexico.
"""
SHIPPING_CREDENTIAL_MX
"""
Localized field key 'shipping_credential_my' for country Malaysia.
"""
SHIPPING_CREDENTIAL_MY
"""
Localized field key 'shipping_credential_pe' for country Peru.
"""
SHIPPING_CREDENTIAL_PE
"""
Localized field key 'shipping_credential_pt' for country Portugal.
"""
SHIPPING_CREDENTIAL_PT
"""
Localized field key 'shipping_credential_py' for country Paraguay.
"""
SHIPPING_CREDENTIAL_PY
"""
Localized field key 'shipping_credential_tr' for country Turkey.
"""
SHIPPING_CREDENTIAL_TR
"""
Localized field key 'shipping_credential_tw' for country Taiwan.
"""
SHIPPING_CREDENTIAL_TW
"""
Localized field key 'shipping_credential_type_co' for country Colombia.
"""
SHIPPING_CREDENTIAL_TYPE_CO
"""
Localized field key 'tax_credential_br' for country Brazil.
"""
TAX_CREDENTIAL_BR
"""
Localized field key 'tax_credential_cl' for country Chile.
"""
TAX_CREDENTIAL_CL
"""
Localized field key 'tax_credential_co' for country Colombia.
"""
TAX_CREDENTIAL_CO
"""
Localized field key 'tax_credential_cr' for country Costa Rica.
"""
TAX_CREDENTIAL_CR
"""
Localized field key 'tax_credential_ec' for country Ecuador.
"""
TAX_CREDENTIAL_EC
"""
Localized field key 'tax_credential_es' for country Spain.
"""
TAX_CREDENTIAL_ES
"""
Localized field key 'tax_credential_gt' for country Guatemala.
"""
TAX_CREDENTIAL_GT
"""
Localized field key 'tax_credential_id' for country Indonesia.
"""
TAX_CREDENTIAL_ID
"""
Localized field key 'tax_credential_it' for country Italy.
"""
TAX_CREDENTIAL_IT
"""
Localized field key 'tax_credential_mx' for country Mexico.
"""
TAX_CREDENTIAL_MX
"""
Localized field key 'tax_credential_my' for country Malaysia.
"""
TAX_CREDENTIAL_MY
"""
Localized field key 'tax_credential_pe' for country Peru.
"""
TAX_CREDENTIAL_PE
"""
Localized field key 'tax_credential_pt' for country Portugal.
"""
TAX_CREDENTIAL_PT
"""
Localized field key 'tax_credential_py' for country Paraguay.
"""
TAX_CREDENTIAL_PY
"""
Localized field key 'tax_credential_tr' for country Turkey.
"""
TAX_CREDENTIAL_TR
"""
Localized field key 'tax_credential_type_co' for country Colombia.
"""
TAX_CREDENTIAL_TYPE_CO
"""
Localized field key 'tax_credential_type_mx' for country Mexico.
"""
TAX_CREDENTIAL_TYPE_MX
"""
Localized field key 'tax_credential_use_mx' for country Mexico.
"""
TAX_CREDENTIAL_USE_MX
"""
Localized field key 'tax_email_it' for country Italy.
"""
TAX_EMAIL_IT
}
"""
Represents a mailing address.
"""
type MailingAddress {
"""
The first line of the address. Typically the street address or PO Box number.
"""
address1: String
"""
The second line of the address. Typically the number of the apartment, suite, or unit.
"""
address2: String
"""
The name of the city, district, village, or town.
"""
city: String
"""
The name of the customer's company or organization.
"""
company: String
"""
The two-letter code for the country of the address. For example, US.
"""
countryCode: CountryCode
"""
The first name of the customer.
"""
firstName: String
"""
The last name of the customer.
"""
lastName: String
"""
The approximate latitude of the address.
"""
latitude: Float
"""
The approximate longitude of the address.
"""
longitude: Float
"""
The market of the address.
"""
market: Market
"""
The full name of the customer, based on firstName and lastName.
"""
name: String
"""
A unique phone number for the customer. Formatted using E.164 standard. For example, +16135551111.
"""
phone: String
"""
The alphanumeric code for the region. For example, ON.
"""
provinceCode: String
"""
The zip or postal code of the address.
"""
zip: String
}
"""
A market is a group of one or more regions that you want to target for international sales.
By creating a market, you can configure a distinct, localized shopping experience for
customers from a specific area of the world. For example, you can
[change currency](https://shopify.dev/api/admin-graphql/current/mutations/marketCurrencySettingsUpdate),
[configure international pricing](https://shopify.dev/api/examples/product-price-lists),
or [add market-specific domains or subfolders](https://shopify.dev/api/admin-graphql/current/objects/MarketWebPresence).
"""
type Market implements HasMetafields {
"""
A human-readable unique string for the market automatically generated from its title.
"""
handle: Handle!
"""
A globally-unique identifier.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
A geographic region which comprises a market.
"""
regions: [MarketRegion!]!
}
"""
Represents a region.
"""
interface MarketRegion {
"""
The name of the region in the language of the current localization.
"""
name: String
}
"""
A country which comprises a market.
"""
type MarketRegionCountry implements MarketRegion {
"""
The two-letter code for the country.
"""
code: CountryCode!
"""
The country name in the language of the current localization.
"""
name: String!
}
"""
The item that a customer intends to purchase. Merchandise can be a product variant or a custom
product.
A product variant is a specific version of a product that comes in more than one option, such as size or color.
For example, if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be
one product variant and a large, blue t-shirt would be another.
A custom product represents a product that doesn't map to Shopify's
[standard product categories](https://help.shopify.com/manual/products/details/product-type).
For example, you can use a custom product to manage gift cards, shipping requirements, localized product
information, or weight measurements and conversions.
"""
union Merchandise = CustomProduct | ProductVariant
"""
[Custom fields](https://shopify.dev/docs/apps/build/custom-data) that store additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
type Metafield {
"""
The data that's stored in the metafield, using JSON format.
"""
jsonValue: JSON!
"""
The [type of data](https://shopify.dev/apps/metafields/types) that the metafield stores in
the `value` field.
"""
type: String!
"""
The data that's stored in the metafield. The data is always stored as a string,
regardless of the [metafield's type](https://shopify.dev/apps/metafields/types).
"""
value: String!
}
"""
A precise monetary value and its associated currency. For example, 12.99 USD.
"""
type MoneyV2 {
"""
A monetary value in decimal format, allowing for precise representation of cents or fractional
currency. For example, 12.99.
"""
amount: Decimal!
"""
The three-letter currency code that represents a world currency used in a store. Currency codes
include standard [standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes,
and non-standard codes. For example, USD.
"""
currencyCode: CurrencyCode!
}
"""
The root mutation for the API.
"""
type MutationRoot {
"""
Handles the Function result for the purchase.validation.fetch target.
"""
fetch(
"""
The result of the Function.
"""
result: FunctionFetchResult!
): Void!
"""
Handles the Function result.
"""
handleResult(
"""
The result of the Function.
"""
result: FunctionResult!
): Void! @deprecated(reason: "Use the target-specific field instead.")
"""
Handles the Function result for the purchase.validation.run target.
"""
run(
"""
The result of the Function.
"""
result: FunctionRunResult!
): Void!
}
"""
The goods and services that merchants offer to customers. Products can include details such as
title, vendor, and custom data stored in [metafields](https://shopify.dev/docs/apps/build/custom-data).
Products can be organized by grouping them into a collection.
Learn more about [managing products in a merchant's store](https://help.shopify.com/manual/products).
"""
type Product implements HasMetafields {
"""
A unique, human-readable string of the product's title. A handle can contain letters, hyphens (`-`), and
numbers, but not spaces. The handle is used in the online store URL for the product. For example, if a product
is titled "Black Sunglasses", then the handle is `black-sunglasses`.
"""
handle: Handle!
"""
Whether the product is associated with any of the specified tags. The product must have at least one tag
from the list to return `true`.
"""
hasAnyTag(
"""
A comma-separated list of searchable keywords that are associated with the product. For example,
`"sports, summer"` returns products with either the `sports` or `summer` tag.
"""
tags: [String!]! = []
): Boolean!
"""
Whether the product is associated with the specified tags. The product must have all of the tags in the list
to return `true`.
"""
hasTags(
"""
A comma-separated list of searchable keywords that are associated with the product. For example,
`"sports, summer"` returns products with both the `sports` and `summer` tags.
"""
tags: [String!]! = []
): [HasTagResponse!]!
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the product.
"""
id: ID!
"""
Whether the product is in any of the specified collections. The product must be in at least one collection
from the list to return `true`.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
inAnyCollection(
"""
A comma-separated list of [globally-unique collection IDs](https://shopify.dev/docs/api/usage/gids)
that are associated with the product. For example, `gid://shopify/Collection/123`, `gid://shopify/Collection/456`.
"""
ids: [ID!]! = []
): Boolean!
"""
Whether the product is in the specified collections. The product must be in all of the collections in the
list to return `true`.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
inCollections(
"""
A comma-separated list of [globally-unique collection IDs](https://shopify.dev/docs/api/usage/gids)
that are associated with the product. For example, `gid://shopify/Collection/123`, `gid://shopify/Collection/456`.
"""
ids: [ID!]! = []
): [CollectionMembership!]!
"""
Whether the product is a gift card.
"""
isGiftCard: Boolean!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
A custom category for a product. Product types allow merchants to define categories other than the
ones available in Shopify's
[standard product categories](https://help.shopify.com/manual/products/details/product-type).
"""
productType: String
"""
The localized name for the product that displays to customers. The title is used to construct the product's
handle, which is a unique, human-readable string of the product's title. For example, if a product is titled
"Black Sunglasses", then the handle is `black-sunglasses`.
"""
title: String!
"""
The name of the product's vendor.
"""
vendor: String
}
"""
A specific version of a product that comes in more than one option, such as size or color. For example,
if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be one
product variant and a large, blue t-shirt would be another.
"""
type ProductVariant implements HasMetafields {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the product variant.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The product associated with the product variant. For example, if a
merchant sells t-shirts with options for size and color, then a small,
blue t-shirt would be one product variant and a large, blue t-shirt would be another.
The product associated with the product variant would be the t-shirt itself.
"""
product: Product!
"""
Whether the item needs to be shipped to the customer. For example, a
digital gift card doesn't need to be shipped, but a t-shirt does
need to be shipped.
"""
requiresShipping: Boolean!
"""
A case-sensitive identifier for the product variant in the merchant's store. For example, `"BBC-1"`.
A product variant must have a SKU to be connected to a
[fulfillment service](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services).
"""
sku: String
"""
The localized name for the product variant that displays to customers.
"""
title: String
"""
The product variant's weight, in the system of measurement set in the `weightUnit` field.
"""
weight: Float
"""
The unit of measurement for weight.
"""
weightUnit: WeightUnit!
}
"""
The company of a B2B customer that's interacting with the cart.
Used to manage and track purchases made by businesses rather than individual customers.
"""
type PurchasingCompany {
"""
The company associated to the order or draft order.
"""
company: Company!
"""
The company contact associated to the order or draft order.
"""
contact: CompanyContact
"""
The company location associated to the order or draft order.
"""
location: CompanyLocation!
}
"""
Represents how products and variants can be sold and purchased.
"""
type SellingPlan implements HasMetafields {
"""
The description of the selling plan.
"""
description: String
"""
A globally-unique identifier.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the selling plan. For example, '6 weeks of prepaid granola, delivered weekly'.
"""
name: String!
"""
Whether purchasing the selling plan will result in multiple deliveries.
"""
recurringDeliveries: Boolean!
}
"""
Represents an association between a variant and a selling plan. Selling plan
allocations describe the options offered for each variant, and the price of the
variant when purchased with a selling plan.
"""
type SellingPlanAllocation {
"""
A list of price adjustments, with a maximum of two. When there are two, the
first price adjustment goes into effect at the time of purchase, while the
second one starts after a certain number of orders. A price adjustment
represents how a selling plan affects pricing when a variant is purchased with
a selling plan. Prices display in the customer's currency if the shop is
configured for it.
"""
priceAdjustments: [SellingPlanAllocationPriceAdjustment!]!
"""
A representation of how products and variants can be sold and purchased. For
example, an individual selling plan could be '6 weeks of prepaid granola,
delivered weekly'.
"""
sellingPlan: SellingPlan!
}
"""
The resulting prices for variants when they're purchased with a specific selling plan.
"""
type SellingPlanAllocationPriceAdjustment {
"""
The effective price for a single delivery. For example, for a prepaid
subscription plan that includes 6 deliveries at the price of $48.00, the per
delivery price is $8.00.
"""
perDeliveryPrice: MoneyV2!
"""
The price of the variant when it's purchased with a selling plan For example,
for a prepaid subscription plan that includes 6 deliveries of $10.00 granola,
where the customer gets 20% off, the price is 6 x $10.00 x 0.80 = $48.00.
"""
price: MoneyV2!
}
"""
Information about the store, including the store's timezone setting
and custom data stored in [metafields](https://shopify.dev/docs/apps/build/custom-data).
"""
type Shop implements HasMetafields {
"""
The current time based on the
[store's timezone setting](https://help.shopify.com/manual/intro-to-shopify/initial-setup/setup-business-settings).
"""
localTime: LocalTime!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
}
"""
A subset of the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format that
includes the time but not the date or timezone which is determined from context.
For example, "05:43:21".
"""
scalar TimeWithoutTimezone
"""
Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and
[RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string.
For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host
(`example.myshopify.com`).
"""
scalar URL
"""
A customization that validates a cart and/or checkout.
"""
type Validation implements HasMetafields {
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
}
"""
A void type that can be used to return a null value from a mutation.
"""
scalar Void
"""
Units of measurement for weight.
"""
enum WeightUnit {
"""
Metric system unit of mass.
"""
GRAMS
"""
1 kilogram equals 1000 grams.
"""
KILOGRAMS
"""
Imperial system unit of mass.
"""
OUNCES
"""
1 pound equals 16 ounces.
"""
POUNDS
}
================================================
FILE: checkout/javascript/cart-checkout-validation/default/shopify.extension.toml.liquid
================================================
api_version = "2025-01"
[[extensions]]
name = "t:name"
handle = "{{handle}}"
type = "function"
{% if uid %}uid = "{{ uid }}"{% endif %}
description = "t:description"
[[extensions.targeting]]
target = "purchase.validation.run"
input_query = "src/run.graphql"
export = "run"
[extensions.build]
command = ""
path = "dist/function.wasm"
================================================
FILE: checkout/javascript/cart-checkout-validation/default/src/index.liquid
================================================
export * from './run';
================================================
FILE: checkout/javascript/cart-checkout-validation/default/src/run.graphql.liquid
================================================
query RunInput {
cart {
lines {
quantity
}
}
}
================================================
FILE: checkout/javascript/cart-checkout-validation/default/src/run.liquid
================================================
{%- if flavor contains "vanilla-js" -%}
// @ts-check
/**
* @typedef {import("../generated/api").RunInput} RunInput
* @typedef {import("../generated/api").FunctionRunResult} FunctionRunResult
*/
/**
* @param {RunInput} input
* @returns {FunctionRunResult}
*/
export function run(input) {
const errors = input.cart.lines
.filter(({ quantity }) => quantity > 1)
.map(() => ({
localizedMessage: "Not possible to order more than one of each",
target: "$.cart",
}));
return {
errors
}
};
{%- elsif flavor contains "typescript" -%}
import type {
RunInput,
FunctionRunResult,
FunctionError,
} from "../generated/api";
export function run(input: RunInput): FunctionRunResult {
const errors: FunctionError[] = input.cart.lines
.filter(({ quantity }) => quantity > 1)
.map(() => ({
localizedMessage: "Not possible to order more than one of each",
target: "$.cart",
}));
return {
errors
}
};
{%- endif -%}
================================================
FILE: checkout/javascript/cart-checkout-validation/default/src/run.test.liquid
================================================
{%- if flavor contains "vanilla-js" -%}
import { describe, it, expect } from 'vitest';
import { run } from './run';
/**
* @typedef {import("../generated/api").FunctionRunResult} FunctionRunResult
*/
describe('cart checkout validation function', () => {
it('returns an error when quantity exceeds one', () => {
const result = run({
cart: {
lines: [
{
quantity: 3
}
]
}
});
const expected = /** @type {FunctionRunResult} */ ({ errors: [
{
localizedMessage: "Not possible to order more than one of each",
target: "$.cart"
}
] });
expect(result).toEqual(expected);
});
it('returns no errors when quantity is one', () => {
const result = run({
cart: {
lines: [
{
quantity: 1
}
]
}
});
const expected = /** @type {FunctionRunResult} */ ({ errors: [] });
expect(result).toEqual(expected);
});
});
{%- elsif flavor contains "typescript" -%}
import { describe, it, expect } from 'vitest';
import { run } from './run';
import { FunctionRunResult } from "../generated/api";
describe('cart checkout validation function', () => {
it('returns an error when quantity exceeds one', () => {
const result = run({
cart: {
lines: [
{
quantity: 3
}
]
}
});
const expected: FunctionRunResult = { errors: [
{
localizedMessage: "Not possible to order more than one of each",
target: "$.cart"
}
] };
expect(result).toEqual(expected);
});
it('returns no errors when quantity is one', () => {
const result = run({
cart: {
lines: [
{
quantity: 1
}
]
}
});
const expected: FunctionRunResult = { errors: [] };
expect(result).toEqual(expected);
});
});
{%- endif -%}
================================================
FILE: checkout/javascript/cart-checkout-validation/default/vite.config.js
================================================
// Prevents inheritance from parent Remix project
================================================
FILE: checkout/javascript/cart-transform/default/.gitignore
================================================
dist
generated
================================================
FILE: checkout/javascript/cart-transform/default/locales/en.default.json.liquid
================================================
{
"name": "{{name}}",
"description": "{{name}}"
}
================================================
FILE: checkout/javascript/cart-transform/default/package.json.liquid
================================================
{
"name": "{{handle}}",
"version": "0.0.1",
"license": "UNLICENSED",
"scripts": {
"shopify": "npm exec -- shopify",
"typegen": "npm exec -- shopify app function typegen",
"build": "npm exec -- shopify app function build",
"preview": "npm exec -- shopify app function run",
"test": "vitest run",
"test:watch": "vitest watch"
},
"codegen": {
"schema": "schema.graphql",
"documents": "src/*.graphql",
"generates": {
"./generated/api.ts": {
"plugins": [
"typescript",
"typescript-operations"
]
}
},
"config": {
"omitOperationSuffix": true
}
},
"devDependencies": {
"vitest": "^0.29.8"
},
"dependencies": {
"@shopify/shopify_function": "~1.0.0"
}
}
================================================
FILE: checkout/javascript/cart-transform/default/schema.graphql
================================================
schema {
query: Input
mutation: MutationRoot
}
"""
Scale the Functions resource limits based on the field's length.
"""
directive @scaleLimits(rate: Float!) on FIELD_DEFINITION
"""
Requires that exactly one field must be supplied and that field must not be `null`.
"""
directive @oneOf on INPUT_OBJECT
"""
A custom property. Attributes are used to store additional information about a Shopify resource, such as
products, customers, or orders. Attributes are stored as key-value pairs.
For example, a list of attributes might include whether a customer is a first-time buyer (`"customer_first_order": "true"`),
whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred delivery date
(`"preferred_delivery_date": "2025-10-01"`), the discount applied (`"loyalty_discount_applied": "10%"`), and any
notes provided by the customer (`"customer_notes": "Please leave at the front door"`).
"""
type Attribute {
"""
The key or name of the attribute. For example, `"customer_first_order"`.
"""
key: String!
"""
The value of the attribute. For example, `"true"`.
"""
value: String
}
"""
The custom attributes associated with a cart line to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
"""
input AttributeOutput {
"""
The key of the cart line attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String!
"""
The value of the cart line attribute to retrieve. For example, `"true"`.
"""
value: String!
}
"""
Information about the customer that's interacting with the cart. It includes details such as the
customer's email and phone number, and the total amount of money the customer has spent in the store.
This information helps personalize the checkout experience and ensures that accurate pricing and delivery options
are displayed to customers.
"""
type BuyerIdentity {
"""
The customer that's interacting with the cart. A customer is a buyer who has an
[account](https://help.shopify.com/manual/customers/customer-accounts) with the store.
"""
customer: Customer
"""
The email address of the customer that's interacting with the cart.
"""
email: String
"""
Whether the customer is authenticated through their
[customer account](https://help.shopify.com/manual/customers/customer-accounts).
If the customer is authenticated, then the `customer` field returns the customer's information.
If the customer isn't authenticated, then the `customer` field returns `null`.
"""
isAuthenticated: Boolean!
"""
The phone number of the customer that's interacting with the cart.
"""
phone: String
"""
The company of a B2B customer that's interacting with the cart.
Used to manage and track purchases made by businesses rather than individual customers.
"""
purchasingCompany: PurchasingCompany
}
"""
The cart where the Function is running. A cart contains the merchandise that a customer intends to purchase
and information about the customer, such as the customer's email address and phone number.
"""
type Cart {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
Information about the customer that's interacting with the cart. It includes details such as the
customer's email and phone number, and the total amount of money the customer has spent in the store.
This information helps personalize the checkout experience and ensures that accurate pricing and delivery options
are displayed to customers.
"""
buyerIdentity: BuyerIdentity
"""
The items in a cart that the customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
lines: [CartLine!]! @scaleLimits(rate: 0.005)
}
"""
Information about an item in a cart that a customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
type CartLine {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
Cart line attributes are equivalent to the
[`line_item`](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
object in Liquid.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
The cost of an item in a cart that the customer intends to purchase. Cart lines are entries in the customer's
cart that represent a single unit of a product variant. For example, if a customer adds two different sizes of
the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
cost: CartLineCost!
"""
The ID of the cart line.
"""
id: ID!
"""
The item that the customer intends to purchase.
"""
merchandise: Merchandise!
"""
The quantity of the item that the customer intends to purchase.
"""
quantity: Int!
"""
The [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
associated with the cart line, including information about how a product variant can be sold and purchased.
"""
sellingPlanAllocation: SellingPlanAllocation
}
"""
The cost of an item in a cart that the customer intends to purchase. Cart lines are entries in the customer's
cart that represent a single unit of a product variant. For example, if a customer adds two different sizes of
the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
type CartLineCost {
"""
The cost of a single unit. For example, if a customer purchases three units of a product
that are priced at $10 each, then the `amountPerQuantity` is $10.
"""
amountPerQuantity: MoneyV2!
"""
The cost of a single unit before any discounts are applied. This field is used to calculate and display
savings for customers. For example, if a product's `compareAtAmountPerQuantity` is $25 and its current price
is $20, then the customer sees a $5 discount. This value can change based on the buyer's identity and is
`null` when the value is hidden from buyers.
"""
compareAtAmountPerQuantity: MoneyV2
"""
The cost of items in the cart before applying any discounts to certain items.
This amount serves as the starting point for calculating any potential savings customers
might receive through promotions or discounts.
"""
subtotalAmount: MoneyV2!
"""
The total cost of items in a cart.
"""
totalAmount: MoneyV2!
}
input CartLineInput {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for a line item in a cart. A cart line represents a single unit of a
product variant that a customer intends to purchase.
"""
cartLineId: ID!
"""
The quantity of the cart line to be merged.The max quantity is 2000.
"""
quantity: Int!
}
"""
An operation to apply to the cart. For example, you can expand a cart line item to display
its [bundled items](https://shopify.dev/docs/apps/build/product-merchandising/bundles), merge
multiple cart lines into a single line representing a bundle, and update the presentation of line items
in the cart to override their price, title, or image.
"""
input CartOperation @oneOf {
"""
An operation that expands a single cart line item to form a
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles)
of components.
"""
expand: ExpandOperation
"""
An operation that merges multiple cart line items into a
single line, representing a
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles)
of components.
"""
merge: MergeOperation
"""
An operation that allows you to override the price, title,
and image of a cart line item. Only stores on a
[Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan)
can use apps with `update` operations.
"""
update: UpdateOperation
}
"""
A customization that changes the pricing and
presentation of items in a cart. For example,
you can modify the appearance of cart items,
such as updating titles and images,
or [bundling items](https://shopify.dev/docs/apps/build/product-merchandising/bundles).
"""
type CartTransform implements HasMetafields {
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
}
"""
Whether the product is in the specified collection.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
type CollectionMembership {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the collection.
"""
collectionId: ID!
"""
Whether the product is in the specified collection.
"""
isMember: Boolean!
}
"""
Represents information about a company which is also a customer of the shop.
"""
type Company implements HasMetafields {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify.
"""
createdAt: DateTime!
"""
A unique externally-supplied ID for the company.
"""
externalId: String
"""
The ID of the company.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the company.
"""
name: String!
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified.
"""
updatedAt: DateTime!
}
"""
A company's main point of contact.
"""
type CompanyContact {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company contact was created in Shopify.
"""
createdAt: DateTime!
"""
The ID of the company.
"""
id: ID!
"""
The company contact's locale (language).
"""
locale: String
"""
The company contact's job title.
"""
title: String
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company contact was last modified.
"""
updatedAt: DateTime!
}
"""
A company's location.
"""
type CompanyLocation implements HasMetafields {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company location was created in Shopify.
"""
createdAt: DateTime!
"""
A unique externally-supplied ID for the company.
"""
externalId: String
"""
The ID of the company.
"""
id: ID!
"""
The preferred locale of the company location.
"""
locale: String
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the company location.
"""
name: String!
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company location was last modified.
"""
updatedAt: DateTime!
}
"""
The country for which the store is customized, reflecting local preferences and regulations.
Localization might influence the language, currency, and product offerings available in a store to enhance
the shopping experience for customers in that region.
"""
type Country {
"""
The ISO code of the country.
"""
isoCode: CountryCode!
}
"""
The code designating a country/region, which generally follows ISO 3166-1 alpha-2 guidelines.
If a territory doesn't have a country code value in the `CountryCode` enum, then it might be considered a subdivision
of another country. For example, the territories associated with Spain are represented by the country code `ES`,
and the territories associated with the United States of America are represented by the country code `US`.
"""
enum CountryCode {
"""
Ascension Island.
"""
AC
"""
Andorra.
"""
AD
"""
United Arab Emirates.
"""
AE
"""
Afghanistan.
"""
AF
"""
Antigua & Barbuda.
"""
AG
"""
Anguilla.
"""
AI
"""
Albania.
"""
AL
"""
Armenia.
"""
AM
"""
Netherlands Antilles.
"""
AN
"""
Angola.
"""
AO
"""
Argentina.
"""
AR
"""
Austria.
"""
AT
"""
Australia.
"""
AU
"""
Aruba.
"""
AW
"""
Åland Islands.
"""
AX
"""
Azerbaijan.
"""
AZ
"""
Bosnia & Herzegovina.
"""
BA
"""
Barbados.
"""
BB
"""
Bangladesh.
"""
BD
"""
Belgium.
"""
BE
"""
Burkina Faso.
"""
BF
"""
Bulgaria.
"""
BG
"""
Bahrain.
"""
BH
"""
Burundi.
"""
BI
"""
Benin.
"""
BJ
"""
St. Barthélemy.
"""
BL
"""
Bermuda.
"""
BM
"""
Brunei.
"""
BN
"""
Bolivia.
"""
BO
"""
Caribbean Netherlands.
"""
BQ
"""
Brazil.
"""
BR
"""
Bahamas.
"""
BS
"""
Bhutan.
"""
BT
"""
Bouvet Island.
"""
BV
"""
Botswana.
"""
BW
"""
Belarus.
"""
BY
"""
Belize.
"""
BZ
"""
Canada.
"""
CA
"""
Cocos (Keeling) Islands.
"""
CC
"""
Congo - Kinshasa.
"""
CD
"""
Central African Republic.
"""
CF
"""
Congo - Brazzaville.
"""
CG
"""
Switzerland.
"""
CH
"""
Côte d’Ivoire.
"""
CI
"""
Cook Islands.
"""
CK
"""
Chile.
"""
CL
"""
Cameroon.
"""
CM
"""
China.
"""
CN
"""
Colombia.
"""
CO
"""
Costa Rica.
"""
CR
"""
Cuba.
"""
CU
"""
Cape Verde.
"""
CV
"""
Curaçao.
"""
CW
"""
Christmas Island.
"""
CX
"""
Cyprus.
"""
CY
"""
Czechia.
"""
CZ
"""
Germany.
"""
DE
"""
Djibouti.
"""
DJ
"""
Denmark.
"""
DK
"""
Dominica.
"""
DM
"""
Dominican Republic.
"""
DO
"""
Algeria.
"""
DZ
"""
Ecuador.
"""
EC
"""
Estonia.
"""
EE
"""
Egypt.
"""
EG
"""
Western Sahara.
"""
EH
"""
Eritrea.
"""
ER
"""
Spain.
"""
ES
"""
Ethiopia.
"""
ET
"""
Finland.
"""
FI
"""
Fiji.
"""
FJ
"""
Falkland Islands.
"""
FK
"""
Faroe Islands.
"""
FO
"""
France.
"""
FR
"""
Gabon.
"""
GA
"""
United Kingdom.
"""
GB
"""
Grenada.
"""
GD
"""
Georgia.
"""
GE
"""
French Guiana.
"""
GF
"""
Guernsey.
"""
GG
"""
Ghana.
"""
GH
"""
Gibraltar.
"""
GI
"""
Greenland.
"""
GL
"""
Gambia.
"""
GM
"""
Guinea.
"""
GN
"""
Guadeloupe.
"""
GP
"""
Equatorial Guinea.
"""
GQ
"""
Greece.
"""
GR
"""
South Georgia & South Sandwich Islands.
"""
GS
"""
Guatemala.
"""
GT
"""
Guinea-Bissau.
"""
GW
"""
Guyana.
"""
GY
"""
Hong Kong SAR.
"""
HK
"""
Heard & McDonald Islands.
"""
HM
"""
Honduras.
"""
HN
"""
Croatia.
"""
HR
"""
Haiti.
"""
HT
"""
Hungary.
"""
HU
"""
Indonesia.
"""
ID
"""
Ireland.
"""
IE
"""
Israel.
"""
IL
"""
Isle of Man.
"""
IM
"""
India.
"""
IN
"""
British Indian Ocean Territory.
"""
IO
"""
Iraq.
"""
IQ
"""
Iran.
"""
IR
"""
Iceland.
"""
IS
"""
Italy.
"""
IT
"""
Jersey.
"""
JE
"""
Jamaica.
"""
JM
"""
Jordan.
"""
JO
"""
Japan.
"""
JP
"""
Kenya.
"""
KE
"""
Kyrgyzstan.
"""
KG
"""
Cambodia.
"""
KH
"""
Kiribati.
"""
KI
"""
Comoros.
"""
KM
"""
St. Kitts & Nevis.
"""
KN
"""
North Korea.
"""
KP
"""
South Korea.
"""
KR
"""
Kuwait.
"""
KW
"""
Cayman Islands.
"""
KY
"""
Kazakhstan.
"""
KZ
"""
Laos.
"""
LA
"""
Lebanon.
"""
LB
"""
St. Lucia.
"""
LC
"""
Liechtenstein.
"""
LI
"""
Sri Lanka.
"""
LK
"""
Liberia.
"""
LR
"""
Lesotho.
"""
LS
"""
Lithuania.
"""
LT
"""
Luxembourg.
"""
LU
"""
Latvia.
"""
LV
"""
Libya.
"""
LY
"""
Morocco.
"""
MA
"""
Monaco.
"""
MC
"""
Moldova.
"""
MD
"""
Montenegro.
"""
ME
"""
St. Martin.
"""
MF
"""
Madagascar.
"""
MG
"""
North Macedonia.
"""
MK
"""
Mali.
"""
ML
"""
Myanmar (Burma).
"""
MM
"""
Mongolia.
"""
MN
"""
Macao SAR.
"""
MO
"""
Martinique.
"""
MQ
"""
Mauritania.
"""
MR
"""
Montserrat.
"""
MS
"""
Malta.
"""
MT
"""
Mauritius.
"""
MU
"""
Maldives.
"""
MV
"""
Malawi.
"""
MW
"""
Mexico.
"""
MX
"""
Malaysia.
"""
MY
"""
Mozambique.
"""
MZ
"""
Namibia.
"""
NA
"""
New Caledonia.
"""
NC
"""
Niger.
"""
NE
"""
Norfolk Island.
"""
NF
"""
Nigeria.
"""
NG
"""
Nicaragua.
"""
NI
"""
Netherlands.
"""
NL
"""
Norway.
"""
NO
"""
Nepal.
"""
NP
"""
Nauru.
"""
NR
"""
Niue.
"""
NU
"""
New Zealand.
"""
NZ
"""
Oman.
"""
OM
"""
Panama.
"""
PA
"""
Peru.
"""
PE
"""
French Polynesia.
"""
PF
"""
Papua New Guinea.
"""
PG
"""
Philippines.
"""
PH
"""
Pakistan.
"""
PK
"""
Poland.
"""
PL
"""
St. Pierre & Miquelon.
"""
PM
"""
Pitcairn Islands.
"""
PN
"""
Palestinian Territories.
"""
PS
"""
Portugal.
"""
PT
"""
Paraguay.
"""
PY
"""
Qatar.
"""
QA
"""
Réunion.
"""
RE
"""
Romania.
"""
RO
"""
Serbia.
"""
RS
"""
Russia.
"""
RU
"""
Rwanda.
"""
RW
"""
Saudi Arabia.
"""
SA
"""
Solomon Islands.
"""
SB
"""
Seychelles.
"""
SC
"""
Sudan.
"""
SD
"""
Sweden.
"""
SE
"""
Singapore.
"""
SG
"""
St. Helena.
"""
SH
"""
Slovenia.
"""
SI
"""
Svalbard & Jan Mayen.
"""
SJ
"""
Slovakia.
"""
SK
"""
Sierra Leone.
"""
SL
"""
San Marino.
"""
SM
"""
Senegal.
"""
SN
"""
Somalia.
"""
SO
"""
Suriname.
"""
SR
"""
South Sudan.
"""
SS
"""
São Tomé & Príncipe.
"""
ST
"""
El Salvador.
"""
SV
"""
Sint Maarten.
"""
SX
"""
Syria.
"""
SY
"""
Eswatini.
"""
SZ
"""
Tristan da Cunha.
"""
TA
"""
Turks & Caicos Islands.
"""
TC
"""
Chad.
"""
TD
"""
French Southern Territories.
"""
TF
"""
Togo.
"""
TG
"""
Thailand.
"""
TH
"""
Tajikistan.
"""
TJ
"""
Tokelau.
"""
TK
"""
Timor-Leste.
"""
TL
"""
Turkmenistan.
"""
TM
"""
Tunisia.
"""
TN
"""
Tonga.
"""
TO
"""
Türkiye.
"""
TR
"""
Trinidad & Tobago.
"""
TT
"""
Tuvalu.
"""
TV
"""
Taiwan.
"""
TW
"""
Tanzania.
"""
TZ
"""
Ukraine.
"""
UA
"""
Uganda.
"""
UG
"""
U.S. Outlying Islands.
"""
UM
"""
United States.
"""
US
"""
Uruguay.
"""
UY
"""
Uzbekistan.
"""
UZ
"""
Vatican City.
"""
VA
"""
St. Vincent & Grenadines.
"""
VC
"""
Venezuela.
"""
VE
"""
British Virgin Islands.
"""
VG
"""
Vietnam.
"""
VN
"""
Vanuatu.
"""
VU
"""
Wallis & Futuna.
"""
WF
"""
Samoa.
"""
WS
"""
Kosovo.
"""
XK
"""
Yemen.
"""
YE
"""
Mayotte.
"""
YT
"""
South Africa.
"""
ZA
"""
Zambia.
"""
ZM
"""
Zimbabwe.
"""
ZW
"""
Unknown Region.
"""
ZZ
}
"""
The currency codes that represent the world currencies throughout the Admin API. Currency codes include
[standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes, non-standard codes,
digital currency codes.
"""
enum CurrencyCode {
"""
United Arab Emirates Dirham (AED).
"""
AED
"""
Afghan Afghani (AFN).
"""
AFN
"""
Albanian Lek (ALL).
"""
ALL
"""
Armenian Dram (AMD).
"""
AMD
"""
Netherlands Antillean Guilder.
"""
ANG
"""
Angolan Kwanza (AOA).
"""
AOA
"""
Argentine Pesos (ARS).
"""
ARS
"""
Australian Dollars (AUD).
"""
AUD
"""
Aruban Florin (AWG).
"""
AWG
"""
Azerbaijani Manat (AZN).
"""
AZN
"""
Bosnia and Herzegovina Convertible Mark (BAM).
"""
BAM
"""
Barbadian Dollar (BBD).
"""
BBD
"""
Bangladesh Taka (BDT).
"""
BDT
"""
Bulgarian Lev (BGN).
"""
BGN
"""
Bahraini Dinar (BHD).
"""
BHD
"""
Burundian Franc (BIF).
"""
BIF
"""
Bermudian Dollar (BMD).
"""
BMD
"""
Brunei Dollar (BND).
"""
BND
"""
Bolivian Boliviano (BOB).
"""
BOB
"""
Brazilian Real (BRL).
"""
BRL
"""
Bahamian Dollar (BSD).
"""
BSD
"""
Bhutanese Ngultrum (BTN).
"""
BTN
"""
Botswana Pula (BWP).
"""
BWP
"""
Belarusian Ruble (BYN).
"""
BYN
"""
Belarusian Ruble (BYR).
"""
BYR @deprecated(reason: "Use `BYN` instead.")
"""
Belize Dollar (BZD).
"""
BZD
"""
Canadian Dollars (CAD).
"""
CAD
"""
Congolese franc (CDF).
"""
CDF
"""
Swiss Francs (CHF).
"""
CHF
"""
Chilean Peso (CLP).
"""
CLP
"""
Chinese Yuan Renminbi (CNY).
"""
CNY
"""
Colombian Peso (COP).
"""
COP
"""
Costa Rican Colones (CRC).
"""
CRC
"""
Cape Verdean escudo (CVE).
"""
CVE
"""
Czech Koruny (CZK).
"""
CZK
"""
Djiboutian Franc (DJF).
"""
DJF
"""
Danish Kroner (DKK).
"""
DKK
"""
Dominican Peso (DOP).
"""
DOP
"""
Algerian Dinar (DZD).
"""
DZD
"""
Egyptian Pound (EGP).
"""
EGP
"""
Eritrean Nakfa (ERN).
"""
ERN
"""
Ethiopian Birr (ETB).
"""
ETB
"""
Euro (EUR).
"""
EUR
"""
Fijian Dollars (FJD).
"""
FJD
"""
Falkland Islands Pounds (FKP).
"""
FKP
"""
United Kingdom Pounds (GBP).
"""
GBP
"""
Georgian Lari (GEL).
"""
GEL
"""
Ghanaian Cedi (GHS).
"""
GHS
"""
Gibraltar Pounds (GIP).
"""
GIP
"""
Gambian Dalasi (GMD).
"""
GMD
"""
Guinean Franc (GNF).
"""
GNF
"""
Guatemalan Quetzal (GTQ).
"""
GTQ
"""
Guyanese Dollar (GYD).
"""
GYD
"""
Hong Kong Dollars (HKD).
"""
HKD
"""
Honduran Lempira (HNL).
"""
HNL
"""
Croatian Kuna (HRK).
"""
HRK
"""
Haitian Gourde (HTG).
"""
HTG
"""
Hungarian Forint (HUF).
"""
HUF
"""
Indonesian Rupiah (IDR).
"""
IDR
"""
Israeli New Shekel (NIS).
"""
ILS
"""
Indian Rupees (INR).
"""
INR
"""
Iraqi Dinar (IQD).
"""
IQD
"""
Iranian Rial (IRR).
"""
IRR
"""
Icelandic Kronur (ISK).
"""
ISK
"""
Jersey Pound.
"""
JEP
"""
Jamaican Dollars (JMD).
"""
JMD
"""
Jordanian Dinar (JOD).
"""
JOD
"""
Japanese Yen (JPY).
"""
JPY
"""
Kenyan Shilling (KES).
"""
KES
"""
Kyrgyzstani Som (KGS).
"""
KGS
"""
Cambodian Riel.
"""
KHR
"""
Kiribati Dollar (KID).
"""
KID
"""
Comorian Franc (KMF).
"""
KMF
"""
South Korean Won (KRW).
"""
KRW
"""
Kuwaiti Dinar (KWD).
"""
KWD
"""
Cayman Dollars (KYD).
"""
KYD
"""
Kazakhstani Tenge (KZT).
"""
KZT
"""
Laotian Kip (LAK).
"""
LAK
"""
Lebanese Pounds (LBP).
"""
LBP
"""
Sri Lankan Rupees (LKR).
"""
LKR
"""
Liberian Dollar (LRD).
"""
LRD
"""
Lesotho Loti (LSL).
"""
LSL
"""
Lithuanian Litai (LTL).
"""
LTL
"""
Latvian Lati (LVL).
"""
LVL
"""
Libyan Dinar (LYD).
"""
LYD
"""
Moroccan Dirham.
"""
MAD
"""
Moldovan Leu (MDL).
"""
MDL
"""
Malagasy Ariary (MGA).
"""
MGA
"""
Macedonia Denar (MKD).
"""
MKD
"""
Burmese Kyat (MMK).
"""
MMK
"""
Mongolian Tugrik.
"""
MNT
"""
Macanese Pataca (MOP).
"""
MOP
"""
Mauritanian Ouguiya (MRU).
"""
MRU
"""
Mauritian Rupee (MUR).
"""
MUR
"""
Maldivian Rufiyaa (MVR).
"""
MVR
"""
Malawian Kwacha (MWK).
"""
MWK
"""
Mexican Pesos (MXN).
"""
MXN
"""
Malaysian Ringgits (MYR).
"""
MYR
"""
Mozambican Metical.
"""
MZN
"""
Namibian Dollar.
"""
NAD
"""
Nigerian Naira (NGN).
"""
NGN
"""
Nicaraguan Córdoba (NIO).
"""
NIO
"""
Norwegian Kroner (NOK).
"""
NOK
"""
Nepalese Rupee (NPR).
"""
NPR
"""
New Zealand Dollars (NZD).
"""
NZD
"""
Omani Rial (OMR).
"""
OMR
"""
Panamian Balboa (PAB).
"""
PAB
"""
Peruvian Nuevo Sol (PEN).
"""
PEN
"""
Papua New Guinean Kina (PGK).
"""
PGK
"""
Philippine Peso (PHP).
"""
PHP
"""
Pakistani Rupee (PKR).
"""
PKR
"""
Polish Zlotych (PLN).
"""
PLN
"""
Paraguayan Guarani (PYG).
"""
PYG
"""
Qatari Rial (QAR).
"""
QAR
"""
Romanian Lei (RON).
"""
RON
"""
Serbian dinar (RSD).
"""
RSD
"""
Russian Rubles (RUB).
"""
RUB
"""
Rwandan Franc (RWF).
"""
RWF
"""
Saudi Riyal (SAR).
"""
SAR
"""
Solomon Islands Dollar (SBD).
"""
SBD
"""
Seychellois Rupee (SCR).
"""
SCR
"""
Sudanese Pound (SDG).
"""
SDG
"""
Swedish Kronor (SEK).
"""
SEK
"""
Singapore Dollars (SGD).
"""
SGD
"""
Saint Helena Pounds (SHP).
"""
SHP
"""
Sierra Leonean Leone (SLL).
"""
SLL
"""
Somali Shilling (SOS).
"""
SOS
"""
Surinamese Dollar (SRD).
"""
SRD
"""
South Sudanese Pound (SSP).
"""
SSP
"""
Sao Tome And Principe Dobra (STD).
"""
STD @deprecated(reason: "Use `STN` instead.")
"""
Sao Tome And Principe Dobra (STN).
"""
STN
"""
Syrian Pound (SYP).
"""
SYP
"""
Swazi Lilangeni (SZL).
"""
SZL
"""
Thai baht (THB).
"""
THB
"""
Tajikistani Somoni (TJS).
"""
TJS
"""
Turkmenistani Manat (TMT).
"""
TMT
"""
Tunisian Dinar (TND).
"""
TND
"""
Tongan Pa'anga (TOP).
"""
TOP
"""
Turkish Lira (TRY).
"""
TRY
"""
Trinidad and Tobago Dollars (TTD).
"""
TTD
"""
Taiwan Dollars (TWD).
"""
TWD
"""
Tanzanian Shilling (TZS).
"""
TZS
"""
Ukrainian Hryvnia (UAH).
"""
UAH
"""
Ugandan Shilling (UGX).
"""
UGX
"""
United States Dollars (USD).
"""
USD
"""
United States Dollars Coin (USDC).
"""
USDC
"""
Uruguayan Pesos (UYU).
"""
UYU
"""
Uzbekistan som (UZS).
"""
UZS
"""
Venezuelan Bolivares (VED).
"""
VED
"""
Venezuelan Bolivares (VEF).
"""
VEF @deprecated(reason: "Use `VES` instead.")
"""
Venezuelan Bolivares Soberanos (VES).
"""
VES
"""
Vietnamese đồng (VND).
"""
VND
"""
Vanuatu Vatu (VUV).
"""
VUV
"""
Samoan Tala (WST).
"""
WST
"""
Central African CFA Franc (XAF).
"""
XAF
"""
East Caribbean Dollar (XCD).
"""
XCD
"""
West African CFA franc (XOF).
"""
XOF
"""
CFP Franc (XPF).
"""
XPF
"""
Unrecognized currency.
"""
XXX
"""
Yemeni Rial (YER).
"""
YER
"""
South African Rand (ZAR).
"""
ZAR
"""
Zambian Kwacha (ZMW).
"""
ZMW
}
"""
A custom product represents a product that doesn't map to Shopify's
[standard product categories](https://help.shopify.com/manual/products/details/product-type).
For example, you can use a custom product to manage gift cards, shipping requirements, localized product
information, or weight measurements and conversions.
"""
type CustomProduct {
"""
Whether the merchandise is a gift card.
"""
isGiftCard: Boolean!
"""
Whether the item needs to be shipped to the customer. For example, a
digital gift card doesn't need to be shipped, but a t-shirt does
need to be shipped.
"""
requiresShipping: Boolean!
"""
The localized name for the product that displays to customers. The title is used to construct the product's
handle, which is a unique, human-readable string of the product's title. For example, if a product is titled
"Black Sunglasses", then the handle is `black-sunglasses`.
"""
title: String!
"""
The product variant's weight, in the system of measurement set in the `weightUnit` field.
"""
weight: Float
"""
The unit of measurement for weight.
"""
weightUnit: WeightUnit!
}
"""
Represents a [customer](https://help.shopify.com/manual/customers/manage-customers)
who has an [account](https://help.shopify.com/manual/customers/customer-accounts) with the store.
`Customer` returns data including the customer's contact information and order history.
"""
type Customer implements HasMetafields {
"""
The total amount that the customer has spent on orders.
The amount is converted from the shop's currency to the currency of the cart using a market rate.
"""
amountSpent: MoneyV2!
"""
The full name of the customer, based on the values for `firstName` and `lastName`.
If `firstName` and `lastName` aren't specified, then the value is the customer's email address.
If the email address isn't specified, then the value is the customer's phone number.
"""
displayName: String!
"""
The customer's email address.
"""
email: String
"""
The customer's first name.
"""
firstName: String
"""
Whether the customer is associated with any of the specified tags. The customer must have at least one tag
from the list to return `true`.
"""
hasAnyTag(
"""
A comma-separated list of searchable keywords that are associated with the customer. For example,
`"VIP, Gold"` returns customers with either the `VIP` or `Gold` tag.
"""
tags: [String!]! = []
): Boolean!
"""
Whether the customer is associated with the specified tags. The customer must have all of the tags in the list
to return `true`.
"""
hasTags(
"""
A comma-separated list of searchable keywords that are associated with the customer. For example,
`"VIP, Gold"` returns customers with both the `VIP` and `Gold` tags.
"""
tags: [String!]! = []
): [HasTagResponse!]!
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the customer.
"""
id: ID!
"""
The customer's last name.
"""
lastName: String
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The total number of orders that the customer has made at the store.
"""
numberOfOrders: Int!
}
"""
Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date string.
For example, September 7, 2019 is represented as `"2019-07-16"`.
"""
scalar Date
"""
Represents an [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601)-encoded date and time string.
For example, 3:50 pm on September 7, 2019 in the time zone of UTC (Coordinated Universal Time) is
represented as `"2019-09-07T15:50:00Z`".
"""
scalar DateTime
"""
A subset of the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format that
includes the date and time but not the timezone which is determined from context.
For example, "2018-01-01T00:00:00".
"""
scalar DateTimeWithoutTimezone
"""
A signed decimal number, which supports arbitrary precision and is serialized as a string.
Example values: `"29.99"`, `"29.999"`.
"""
scalar Decimal
"""
An operation that expands a single cart line item to form a
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles)
of components.
"""
input ExpandOperation {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for a line item in a cart. A cart line represents a single unit of a
product variant that a customer intends to purchase.
"""
cartLineId: ID!
"""
The cart items to expand. Each item in the list is a component of the
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A
bundle is a group of products that are sold together as a single unit.
"""
expandedCartItems: [ExpandedItem!]!
"""
The image that replaces the existing image for the group of cart line items.
The image must have a publicly accessible URL.
"""
image: ImageInput
"""
A change to the original price of a group of items. Price adjustments include discounts or additional charges that
affect the final price the customer pays. Price adjustments are often used for promotions, special offers,
or any price changes that the customer qualifies for.
"""
price: PriceAdjustment
"""
The title that replaces the existing title for the cart line item.
If you don't provide a title, then the title of the product variant is used.
"""
title: String
}
"""
The cart item to expand. Each item is a component of the
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A
bundle is a group of products that are sold together as a single unit.
"""
input ExpandedItem {
"""
The custom attributes associated with a cart line to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
"""
attributes: [AttributeOutput!] = []
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the product variant that represents the expanded item.
"""
merchandiseId: ID!
"""
A change to the original price of the expanded item. Price adjustments include discounts or additional charges that
affect the final price the customer pays. Price adjustments are often used for promotions, special offers,
or any price changes that the customer qualifies for.
"""
price: ExpandedItemPriceAdjustment
"""
The quantity of the expanded item. The maximum quantity is
2000.
"""
quantity: Int!
}
"""
A fixed price per unit adjustment to apply to the expanded item.
"""
input ExpandedItemFixedPricePerUnitAdjustment {
"""
The fixed price amount per quantity of the expanded item in presentment currency.
"""
amount: Decimal!
}
"""
A change to the original price of the expanded item. Price adjustments include discounts or additional charges that
affect the final price the customer pays. Price adjustments are often used for promotions, special offers,
or any price changes that the customer qualifies for.
"""
input ExpandedItemPriceAdjustment {
"""
The value of the price adjustment to apply to the expanded item.
"""
adjustment: ExpandedItemPriceAdjustmentValue!
}
"""
A price adjustment to apply to a cart line.
"""
input ExpandedItemPriceAdjustmentValue @oneOf {
"""
A fixed price per unit adjustment to apply to the expanded item.
"""
fixedPricePerUnit: ExpandedItemFixedPricePerUnitAdjustment
}
"""
The output of the Function run target.
The object contains the operations to change the pricing and presentation of items
in a cart. In API versions 2023-10 and beyond, this type is deprecated in favor of `FunctionRunResult`.
"""
input FunctionResult {
"""
The ordered list of operations to apply to the cart. For example, you can expand a cart line item to display
its [bundled items](https://shopify.dev/docs/apps/build/product-merchandising/bundles), merge
multiple cart lines into a single line representing a bundle, and update the presentation of line items
in the cart to override their price, title, or image.
"""
operations: [CartOperation!]!
}
"""
The output of the Function run target.
The object contains the operations to change the pricing and presentation of items
in a cart.
"""
input FunctionRunResult {
"""
The ordered list of operations to apply to the cart. For example, you can expand a cart line item to display
its [bundled items](https://shopify.dev/docs/apps/build/product-merchandising/bundles), merge
multiple cart lines into a single line representing a bundle, and update the presentation of line items
in the cart to override their price, title, or image.
"""
operations: [CartOperation!]!
}
"""
A function-scoped handle to a refer a resource.
The Handle type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"10079785100"`
"""
scalar Handle
"""
Represents information about the metafields associated to the specified resource.
"""
interface HasMetafields {
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
}
"""
Whether a Shopify resource, such as a product or customer, has a specified tag.
"""
type HasTagResponse {
"""
Whether the Shopify resource has the tag.
"""
hasTag: Boolean!
"""
A searchable keyword that's associated with a Shopify resource, such as a product or customer. For example,
a merchant might apply the `sports` and `summer` tags to products that are associated with sportswear for
summer.
"""
tag: String!
}
"""
Represents a unique identifier, often used to refetch an object.
The ID type appears in a JSON response as a String, but it is not intended to be human-readable.
Example value: `"gid://shopify/Product/10079785100"`
"""
scalar ID
"""
An image that replaces the existing image for a single cart line item or group of cart line items.
The image must have a publicly accessible URL.
"""
input ImageInput {
"""
The URL of the image.
"""
url: URL!
}
type Input {
"""
The cart where the Function is running. A cart contains the merchandise that a customer intends to purchase
and information about the customer, such as the customer's email address and phone number.
"""
cart: Cart!
"""
A customization that changes the pricing and
presentation of items in a cart. For example,
you can modify the appearance of cart items,
such as updating titles and images,
or [bundling items](https://shopify.dev/docs/apps/build/product-merchandising/bundles).
"""
cartTransform: CartTransform!
"""
The regional and language settings that determine how the Function
handles currency, numbers, dates, and other locale-specific values
during discount calculations. These settings are based on the store's configured
[localization practices](https://shopify.dev/docs/apps/build/functions/localization-practices-shopify-functions).
"""
localization: Localization!
"""
The exchange rate used to convert discounts between the shop's default
currency and the currency that displays to the customer during checkout.
For example, if a store operates in USD but a customer is viewing discounts in EUR,
then the presentment currency rate handles this conversion for accurate pricing.
"""
presentmentCurrencyRate: Decimal!
"""
Information about the shop where the Function is running, including the shop's timezone
setting and associated [metafields](https://shopify.dev/docs/apps/build/custom-data).
"""
shop: Shop!
}
"""
A [JSON](https://www.json.org/json-en.html) object.
Example value:
`{
"product": {
"id": "gid://shopify/Product/1346443542550",
"title": "White T-shirt",
"options": [{
"name": "Size",
"values": ["M", "L"]
}]
}
}`
"""
scalar JSON
"""
The language for which the store is customized, ensuring content is tailored to local customers.
This includes product descriptions and customer communications that resonate with the target audience.
"""
type Language {
"""
The ISO code.
"""
isoCode: LanguageCode!
}
"""
Language codes supported by Shopify.
"""
enum LanguageCode {
"""
Afrikaans.
"""
AF
"""
Akan.
"""
AK
"""
Amharic.
"""
AM
"""
Arabic.
"""
AR
"""
Assamese.
"""
AS
"""
Azerbaijani.
"""
AZ
"""
Belarusian.
"""
BE
"""
Bulgarian.
"""
BG
"""
Bambara.
"""
BM
"""
Bangla.
"""
BN
"""
Tibetan.
"""
BO
"""
Breton.
"""
BR
"""
Bosnian.
"""
BS
"""
Catalan.
"""
CA
"""
Chechen.
"""
CE
"""
Central Kurdish.
"""
CKB
"""
Czech.
"""
CS
"""
Church Slavic.
"""
CU
"""
Welsh.
"""
CY
"""
Danish.
"""
DA
"""
German.
"""
DE
"""
Dzongkha.
"""
DZ
"""
Ewe.
"""
EE
"""
Greek.
"""
EL
"""
English.
"""
EN
"""
Esperanto.
"""
EO
"""
Spanish.
"""
ES
"""
Estonian.
"""
ET
"""
Basque.
"""
EU
"""
Persian.
"""
FA
"""
Fulah.
"""
FF
"""
Finnish.
"""
FI
"""
Filipino.
"""
FIL
"""
Faroese.
"""
FO
"""
French.
"""
FR
"""
Western Frisian.
"""
FY
"""
Irish.
"""
GA
"""
Scottish Gaelic.
"""
GD
"""
Galician.
"""
GL
"""
Gujarati.
"""
GU
"""
Manx.
"""
GV
"""
Hausa.
"""
HA
"""
Hebrew.
"""
HE
"""
Hindi.
"""
HI
"""
Croatian.
"""
HR
"""
Hungarian.
"""
HU
"""
Armenian.
"""
HY
"""
Interlingua.
"""
IA
"""
Indonesian.
"""
ID
"""
Igbo.
"""
IG
"""
Sichuan Yi.
"""
II
"""
Icelandic.
"""
IS
"""
Italian.
"""
IT
"""
Japanese.
"""
JA
"""
Javanese.
"""
JV
"""
Georgian.
"""
KA
"""
Kikuyu.
"""
KI
"""
Kazakh.
"""
KK
"""
Kalaallisut.
"""
KL
"""
Khmer.
"""
KM
"""
Kannada.
"""
KN
"""
Korean.
"""
KO
"""
Kashmiri.
"""
KS
"""
Kurdish.
"""
KU
"""
Cornish.
"""
KW
"""
Kyrgyz.
"""
KY
"""
Luxembourgish.
"""
LB
"""
Ganda.
"""
LG
"""
Lingala.
"""
LN
"""
Lao.
"""
LO
"""
Lithuanian.
"""
LT
"""
Luba-Katanga.
"""
LU
"""
Latvian.
"""
LV
"""
Malagasy.
"""
MG
"""
Māori.
"""
MI
"""
Macedonian.
"""
MK
"""
Malayalam.
"""
ML
"""
Mongolian.
"""
MN
"""
Marathi.
"""
MR
"""
Malay.
"""
MS
"""
Maltese.
"""
MT
"""
Burmese.
"""
MY
"""
Norwegian (Bokmål).
"""
NB
"""
North Ndebele.
"""
ND
"""
Nepali.
"""
NE
"""
Dutch.
"""
NL
"""
Norwegian Nynorsk.
"""
NN
"""
Norwegian.
"""
NO
"""
Oromo.
"""
OM
"""
Odia.
"""
OR
"""
Ossetic.
"""
OS
"""
Punjabi.
"""
PA
"""
Polish.
"""
PL
"""
Pashto.
"""
PS
"""
Portuguese.
"""
PT
"""
Portuguese (Brazil).
"""
PT_BR
"""
Portuguese (Portugal).
"""
PT_PT
"""
Quechua.
"""
QU
"""
Romansh.
"""
RM
"""
Rundi.
"""
RN
"""
Romanian.
"""
RO
"""
Russian.
"""
RU
"""
Kinyarwanda.
"""
RW
"""
Sanskrit.
"""
SA
"""
Sardinian.
"""
SC
"""
Sindhi.
"""
SD
"""
Northern Sami.
"""
SE
"""
Sango.
"""
SG
"""
Sinhala.
"""
SI
"""
Slovak.
"""
SK
"""
Slovenian.
"""
SL
"""
Shona.
"""
SN
"""
Somali.
"""
SO
"""
Albanian.
"""
SQ
"""
Serbian.
"""
SR
"""
Sundanese.
"""
SU
"""
Swedish.
"""
SV
"""
Swahili.
"""
SW
"""
Tamil.
"""
TA
"""
Telugu.
"""
TE
"""
Tajik.
"""
TG
"""
Thai.
"""
TH
"""
Tigrinya.
"""
TI
"""
Turkmen.
"""
TK
"""
Tongan.
"""
TO
"""
Turkish.
"""
TR
"""
Tatar.
"""
TT
"""
Uyghur.
"""
UG
"""
Ukrainian.
"""
UK
"""
Urdu.
"""
UR
"""
Uzbek.
"""
UZ
"""
Vietnamese.
"""
VI
"""
Volapük.
"""
VO
"""
Wolof.
"""
WO
"""
Xhosa.
"""
XH
"""
Yiddish.
"""
YI
"""
Yoruba.
"""
YO
"""
Chinese.
"""
ZH
"""
Chinese (Simplified).
"""
ZH_CN
"""
Chinese (Traditional).
"""
ZH_TW
"""
Zulu.
"""
ZU
}
"""
The current time based on the
[store's timezone setting](https://help.shopify.com/manual/intro-to-shopify/initial-setup/setup-business-settings).
"""
type LocalTime {
"""
The current date relative to the parent object.
"""
date: Date!
"""
Returns true if the current date and time is at or past the given date and time, and false otherwise.
"""
dateTimeAfter(
"""
The date and time to compare against, assumed to be in the timezone of the parent object.
"""
dateTime: DateTimeWithoutTimezone!
): Boolean!
"""
Returns true if the current date and time is before the given date and time, and false otherwise.
"""
dateTimeBefore(
"""
The date and time to compare against, assumed to be in the timezone of the parent timezone.
"""
dateTime: DateTimeWithoutTimezone!
): Boolean!
"""
Returns true if the current date and time is between the two given date and times, and false otherwise.
"""
dateTimeBetween(
"""
The upper bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
endDateTime: DateTimeWithoutTimezone!
"""
The lower bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
startDateTime: DateTimeWithoutTimezone!
): Boolean!
"""
Returns true if the current time is at or past the given time, and false otherwise.
"""
timeAfter(
"""
The time to compare against, assumed to be in the timezone of the parent timezone.
"""
time: TimeWithoutTimezone!
): Boolean!
"""
Returns true if the current time is at or past the given time, and false otherwise.
"""
timeBefore(
"""
The time to compare against, assumed to be in the timezone of the parent timezone.
"""
time: TimeWithoutTimezone!
): Boolean!
"""
Returns true if the current time is between the two given times, and false otherwise.
"""
timeBetween(
"""
The upper bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
endTime: TimeWithoutTimezone!
"""
The lower bound time to compare against, assumed to be in the timezone of the parent timezone.
"""
startTime: TimeWithoutTimezone!
): Boolean!
}
"""
Details about the localized experience for the store in a specific region, including country and language
settings. The localized experience is determined by the store's settings and the customer's location.
Localization ensures that customers can access relevant content and options while browsing or purchasing
products in a store.
"""
type Localization {
"""
The country for which the store is customized, reflecting local preferences and regulations.
Localization might influence the language, currency, and product offerings available in a store to enhance
the shopping experience for customers in that region.
"""
country: Country!
"""
The language for which the store is customized, ensuring content is tailored to local customers.
This includes product descriptions and customer communications that resonate with the target audience.
"""
language: Language!
"""
The market of the active localized experience.
"""
market: Market!
}
"""
A market is a group of one or more regions that you want to target for international sales.
By creating a market, you can configure a distinct, localized shopping experience for
customers from a specific area of the world. For example, you can
[change currency](https://shopify.dev/api/admin-graphql/current/mutations/marketCurrencySettingsUpdate),
[configure international pricing](https://shopify.dev/api/examples/product-price-lists),
or [add market-specific domains or subfolders](https://shopify.dev/api/admin-graphql/current/objects/MarketWebPresence).
"""
type Market implements HasMetafields {
"""
A human-readable unique string for the market automatically generated from its title.
"""
handle: Handle!
"""
A globally-unique identifier.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
A geographic region which comprises a market.
"""
regions: [MarketRegion!]!
}
"""
Represents a region.
"""
interface MarketRegion {
"""
The name of the region in the language of the current localization.
"""
name: String
}
"""
A country which comprises a market.
"""
type MarketRegionCountry implements MarketRegion {
"""
The two-letter code for the country.
"""
code: CountryCode!
"""
The country name in the language of the current localization.
"""
name: String!
}
"""
The item that a customer intends to purchase. Merchandise can be a product variant or a custom
product.
A product variant is a specific version of a product that comes in more than one option, such as size or color.
For example, if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be
one product variant and a large, blue t-shirt would be another.
A custom product represents a product that doesn't map to Shopify's
[standard product categories](https://help.shopify.com/manual/products/details/product-type).
For example, you can use a custom product to manage gift cards, shipping requirements, localized product
information, or weight measurements and conversions.
"""
union Merchandise = CustomProduct | ProductVariant
"""
An operation that merges multiple cart line items into a
single line, representing a
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles)
of components.
"""
input MergeOperation {
"""
The custom attributes associated with a cart line to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
"""
attributes: [AttributeOutput!] = []
"""
The cart items to merge. Each item in the list is a component of the
[bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles).
"""
cartLines: [CartLineInput!]!
"""
The image that replaces the existing image for the group of cart line items.
The image must have a publicly accessible URL.
"""
image: ImageInput
"""
The [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
of the product variant that represents the collection of cart line items.
"""
parentVariantId: ID!
"""
A change to the original price of a group of items. Price adjustments include discounts or additional charges that
affect the final price the customer pays. Price adjustments are often used for promotions, special offers,
or any price changes that the customer qualifies for.
"""
price: PriceAdjustment
"""
The title that replaces the existing title for a group of cart line items.
If you don't provide a title, then the title of the parent variant is used.
"""
title: String
}
"""
[Custom fields](https://shopify.dev/docs/apps/build/custom-data) that store additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
type Metafield {
"""
The data that's stored in the metafield, using JSON format.
"""
jsonValue: JSON!
"""
The [type of data](https://shopify.dev/apps/metafields/types) that the metafield stores in
the `value` field.
"""
type: String!
"""
The data that's stored in the metafield. The data is always stored as a string,
regardless of the [metafield's type](https://shopify.dev/apps/metafields/types).
"""
value: String!
}
"""
A precise monetary value and its associated currency. For example, 12.99 USD.
"""
type MoneyV2 {
"""
A monetary value in decimal format, allowing for precise representation of cents or fractional
currency. For example, 12.99.
"""
amount: Decimal!
"""
The three-letter currency code that represents a world currency used in a store. Currency codes
include standard [standard ISO 4217 codes](https://en.wikipedia.org/wiki/ISO_4217), legacy codes,
and non-standard codes. For example, USD.
"""
currencyCode: CurrencyCode!
}
"""
The root mutation for the API.
"""
type MutationRoot {
"""
Handles the Function result.
"""
handleResult(
"""
The result of the Function.
"""
result: FunctionResult!
): Void! @deprecated(reason: "Use the target-specific field instead.")
"""
Handles the Function result for the purchase.cart-transform.run target.
"""
run(
"""
The result of the Function.
"""
result: FunctionRunResult!
): Void!
}
"""
A change to the original price of a group of items. Price adjustments include discounts or additional charges that
affect the final price the customer pays. Price adjustments are often used for promotions, special offers,
or any price changes that the customer qualifies for.
"""
input PriceAdjustment {
"""
The percentage price decrease of the price adjustment.
"""
percentageDecrease: PriceAdjustmentValue
}
input PriceAdjustmentValue {
"""
The value of the price adjustment.
"""
value: Decimal!
}
"""
The goods and services that merchants offer to customers. Products can include details such as
title, vendor, and custom data stored in [metafields](https://shopify.dev/docs/apps/build/custom-data).
Products can be organized by grouping them into a collection.
Learn more about [managing products in a merchant's store](https://help.shopify.com/manual/products).
"""
type Product implements HasMetafields {
"""
A unique, human-readable string of the product's title. A handle can contain letters, hyphens (`-`), and
numbers, but not spaces. The handle is used in the online store URL for the product. For example, if a product
is titled "Black Sunglasses", then the handle is `black-sunglasses`.
"""
handle: Handle!
"""
Whether the product is associated with any of the specified tags. The product must have at least one tag
from the list to return `true`.
"""
hasAnyTag(
"""
A comma-separated list of searchable keywords that are associated with the product. For example,
`"sports, summer"` returns products with either the `sports` or `summer` tag.
"""
tags: [String!]! = []
): Boolean!
"""
Whether the product is associated with the specified tags. The product must have all of the tags in the list
to return `true`.
"""
hasTags(
"""
A comma-separated list of searchable keywords that are associated with the product. For example,
`"sports, summer"` returns products with both the `sports` and `summer` tags.
"""
tags: [String!]! = []
): [HasTagResponse!]!
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the product.
"""
id: ID!
"""
Whether the product is in any of the specified collections. The product must be in at least one collection
from the list to return `true`.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
inAnyCollection(
"""
A comma-separated list of [globally-unique collection IDs](https://shopify.dev/docs/api/usage/gids)
that are associated with the product. For example, `gid://shopify/Collection/123`, `gid://shopify/Collection/456`.
"""
ids: [ID!]! = []
): Boolean!
"""
Whether the product is in the specified collections. The product must be in all of the collections in the
list to return `true`.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
inCollections(
"""
A comma-separated list of [globally-unique collection IDs](https://shopify.dev/docs/api/usage/gids)
that are associated with the product. For example, `gid://shopify/Collection/123`, `gid://shopify/Collection/456`.
"""
ids: [ID!]! = []
): [CollectionMembership!]!
"""
Whether the product is a gift card.
"""
isGiftCard: Boolean!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
A custom category for a product. Product types allow merchants to define categories other than the
ones available in Shopify's
[standard product categories](https://help.shopify.com/manual/products/details/product-type).
"""
productType: String
"""
The localized name for the product that displays to customers. The title is used to construct the product's
handle, which is a unique, human-readable string of the product's title. For example, if a product is titled
"Black Sunglasses", then the handle is `black-sunglasses`.
"""
title: String!
"""
The name of the product's vendor.
"""
vendor: String
}
"""
A specific version of a product that comes in more than one option, such as size or color. For example,
if a merchant sells t-shirts with options for size and color, then a small, blue t-shirt would be one
product variant and a large, blue t-shirt would be another.
"""
type ProductVariant implements HasMetafields {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the product variant.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The product associated with the product variant. For example, if a
merchant sells t-shirts with options for size and color, then a small,
blue t-shirt would be one product variant and a large, blue t-shirt would be another.
The product associated with the product variant would be the t-shirt itself.
"""
product: Product!
"""
Whether the item needs to be shipped to the customer. For example, a
digital gift card doesn't need to be shipped, but a t-shirt does
need to be shipped.
"""
requiresShipping: Boolean!
"""
A case-sensitive identifier for the product variant in the merchant's store. For example, `"BBC-1"`.
A product variant must have a SKU to be connected to a
[fulfillment service](https://shopify.dev/docs/apps/build/orders-fulfillment/fulfillment-service-apps/build-for-fulfillment-services).
"""
sku: String
"""
The localized name for the product variant that displays to customers.
"""
title: String
"""
The product variant's weight, in the system of measurement set in the `weightUnit` field.
"""
weight: Float
"""
The unit of measurement for weight.
"""
weightUnit: WeightUnit!
}
"""
The company of a B2B customer that's interacting with the cart.
Used to manage and track purchases made by businesses rather than individual customers.
"""
type PurchasingCompany {
"""
The company associated to the order or draft order.
"""
company: Company!
"""
The company contact associated to the order or draft order.
"""
contact: CompanyContact
"""
The company location associated to the order or draft order.
"""
location: CompanyLocation!
}
"""
Represents how products and variants can be sold and purchased.
"""
type SellingPlan implements HasMetafields {
"""
The description of the selling plan.
"""
description: String
"""
A globally-unique identifier.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the selling plan. For example, '6 weeks of prepaid granola, delivered weekly'.
"""
name: String!
"""
Whether purchasing the selling plan will result in multiple deliveries.
"""
recurringDeliveries: Boolean!
}
"""
Represents an association between a variant and a selling plan. Selling plan
allocations describe the options offered for each variant, and the price of the
variant when purchased with a selling plan.
"""
type SellingPlanAllocation {
"""
A list of price adjustments, with a maximum of two. When there are two, the
first price adjustment goes into effect at the time of purchase, while the
second one starts after a certain number of orders. A price adjustment
represents how a selling plan affects pricing when a variant is purchased with
a selling plan. Prices display in the customer's currency if the shop is
configured for it.
"""
priceAdjustments: [SellingPlanAllocationPriceAdjustment!]!
"""
A representation of how products and variants can be sold and purchased. For
example, an individual selling plan could be '6 weeks of prepaid granola,
delivered weekly'.
"""
sellingPlan: SellingPlan!
}
"""
The resulting prices for variants when they're purchased with a specific selling plan.
"""
type SellingPlanAllocationPriceAdjustment {
"""
The effective price for a single delivery. For example, for a prepaid
subscription plan that includes 6 deliveries at the price of $48.00, the per
delivery price is $8.00.
"""
perDeliveryPrice: MoneyV2!
"""
The price of the variant when it's purchased with a selling plan For example,
for a prepaid subscription plan that includes 6 deliveries of $10.00 granola,
where the customer gets 20% off, the price is 6 x $10.00 x 0.80 = $48.00.
"""
price: MoneyV2!
}
"""
Information about the store, including the store's timezone setting
and custom data stored in [metafields](https://shopify.dev/docs/apps/build/custom-data).
"""
type Shop implements HasMetafields {
"""
The current time based on the
[store's timezone setting](https://help.shopify.com/manual/intro-to-shopify/initial-setup/setup-business-settings).
"""
localTime: LocalTime!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
}
"""
A subset of the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format that
includes the time but not the date or timezone which is determined from context.
For example, "05:43:21".
"""
scalar TimeWithoutTimezone
"""
Represents an [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986) and
[RFC 3987](https://datatracker.ietf.org/doc/html/rfc3987)-compliant URI string.
For example, `"https://example.myshopify.com"` is a valid URL. It includes a scheme (`https`) and a host
(`example.myshopify.com`).
"""
scalar URL
"""
An operation that allows you to override the price, title,
and image of a cart line item. Only stores on a
[Shopify Plus plan](https://help.shopify.com/manual/intro-to-shopify/pricing-plans/plans-features/shopify-plus-plan)
can use apps with `update` operations.
"""
input UpdateOperation {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for a line item in a cart. A cart line represents a single unit of a
product variant that a customer intends to purchase.
"""
cartLineId: ID!
"""
The image that replaces the existing image for the cart line item.
The image must have a publicly accessible URL.
"""
image: ImageInput
"""
A change to an item's original price. Price adjustments include discounts or additional charges that affect the final
price the customer pays. Price adjustments are often used for promotions, special offers, or any price changes
for which the customer qualifies.
"""
price: UpdateOperationPriceAdjustment
"""
The title that replaces the existing title for the cart line item.
If you don't provide a title, then the title of the product variant is used.
"""
title: String
}
"""
A fixed price per unit adjustment to apply to a cart line.
"""
input UpdateOperationFixedPricePerUnitAdjustment {
"""
The fixed price amount per quantity of the cart line item in presentment currency.
"""
amount: Decimal!
}
"""
A change to an item's original price. Price adjustments include discounts or additional charges that affect the final
price the customer pays. Price adjustments are often used for promotions, special offers, or any price changes
for which the customer qualifies.
"""
input UpdateOperationPriceAdjustment {
"""
The price adjustment per unit to apply to the cart line item.
"""
adjustment: UpdateOperationPriceAdjustmentValue!
}
"""
The value of the price adjustment to apply to the updated item.
"""
input UpdateOperationPriceAdjustmentValue @oneOf {
"""
A fixed price per unit adjustment to apply to a cart line.
"""
fixedPricePerUnit: UpdateOperationFixedPricePerUnitAdjustment
}
"""
A void type that can be used to return a null value from a mutation.
"""
scalar Void
"""
Units of measurement for weight.
"""
enum WeightUnit {
"""
Metric system unit of mass.
"""
GRAMS
"""
1 kilogram equals 1000 grams.
"""
KILOGRAMS
"""
Imperial system unit of mass.
"""
OUNCES
"""
1 pound equals 16 ounces.
"""
POUNDS
}
================================================
FILE: checkout/javascript/cart-transform/default/shopify.extension.toml.liquid
================================================
api_version = "2025-01"
[[extensions]]
name = "t:name"
handle = "{{handle}}"
type = "function"
{% if uid %}uid = "{{ uid }}"{% endif %}
description = "t:description"
[[extensions.targeting]]
target = "purchase.cart-transform.run"
input_query = "src/run.graphql"
export = "run"
[extensions.build]
command = ""
path = "dist/function.wasm"
[extensions.ui.paths]
create = "/"
details = "/"
================================================
FILE: checkout/javascript/cart-transform/default/src/index.liquid
================================================
export * from './run';
================================================
FILE: checkout/javascript/cart-transform/default/src/run.graphql.liquid
================================================
query RunInput {
cart {
lines {
id
quantity
}
}
}
================================================
FILE: checkout/javascript/cart-transform/default/src/run.liquid
================================================
{%- if flavor contains "vanilla-js" -%}
// @ts-check
/**
* @typedef {import("../generated/api").RunInput} RunInput
* @typedef {import("../generated/api").FunctionRunResult} FunctionRunResult
*/
/**
* @type {FunctionRunResult}
*/
const NO_CHANGES = {
operations: [],
};
/**
* @param {RunInput} input
* @returns {FunctionRunResult}
*/
export function run(input) {
return NO_CHANGES;
};
{%- elsif flavor contains "typescript" -%}
import type {
RunInput,
FunctionRunResult,
} from "../generated/api";
const NO_CHANGES: FunctionRunResult = {
operations: [],
};
export function run(input: RunInput): FunctionRunResult {
return NO_CHANGES;
};
{%- endif -%}
================================================
FILE: checkout/javascript/cart-transform/default/src/run.test.liquid
================================================
{%- if flavor contains "vanilla-js" -%}
import { describe, it, expect } from 'vitest';
import { run } from './run';
/**
* @typedef {import("../generated/api").FunctionRunResult} FunctionRunResult
*/
describe('cart transform function', () => {
it('returns no operations', () => {
const result = run({});
const expected = /** @type {FunctionRunResult} */ ({ operations: [] });
expect(result).toEqual(expected);
});
});
{%- elsif flavor contains "typescript" -%}
import { describe, it, expect } from 'vitest';
import { run } from './run';
import { FunctionRunResult } from '../generated/api';
describe('cart transform function', () => {
it('returns no operations', () => {
const result = run({
cart: {
lines: []
}
});
const expected: FunctionRunResult = { operations: [] };
expect(result).toEqual(expected);
});
});
{%- endif -%}
================================================
FILE: checkout/javascript/cart-transform/default/vite.config.js
================================================
// Prevents inheritance from parent Remix project
================================================
FILE: checkout/javascript/delivery-customization/default/.gitignore
================================================
dist
generated
================================================
FILE: checkout/javascript/delivery-customization/default/locales/en.default.json.liquid
================================================
{
"name": "{{name}}",
"description": "{{name}}"
}
================================================
FILE: checkout/javascript/delivery-customization/default/package.json.liquid
================================================
{
"name": "{{handle}}",
"version": "0.0.1",
"license": "UNLICENSED",
"scripts": {
"shopify": "npm exec -- shopify",
"typegen": "npm exec -- shopify app function typegen",
"build": "npm exec -- shopify app function build",
"preview": "npm exec -- shopify app function run",
"test": "vitest run",
"test:watch": "vitest watch"
},
"codegen": {
"schema": "schema.graphql",
"documents": "src/*.graphql",
"generates": {
"./generated/api.ts": {
"plugins": [
"typescript",
"typescript-operations"
]
}
},
"config": {
"omitOperationSuffix": true
}
},
"devDependencies": {
"vitest": "^0.29.8"
},
"dependencies": {
"@shopify/shopify_function": "~1.0.0"
}
}
================================================
FILE: checkout/javascript/delivery-customization/default/schema.graphql
================================================
schema {
query: Input
mutation: MutationRoot
}
"""
Scale the Functions resource limits based on the field's length.
"""
directive @scaleLimits(rate: Float!) on FIELD_DEFINITION
"""
Requires that exactly one field must be supplied and that field must not be `null`.
"""
directive @oneOf on INPUT_OBJECT
"""
A custom property. Attributes are used to store additional information about a Shopify resource, such as
products, customers, or orders. Attributes are stored as key-value pairs.
For example, a list of attributes might include whether a customer is a first-time buyer (`"customer_first_order": "true"`),
whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred delivery date
(`"preferred_delivery_date": "2025-10-01"`), the discount applied (`"loyalty_discount_applied": "10%"`), and any
notes provided by the customer (`"customer_notes": "Please leave at the front door"`).
"""
type Attribute {
"""
The key or name of the attribute. For example, `"customer_first_order"`.
"""
key: String!
"""
The value of the attribute. For example, `"true"`.
"""
value: String
}
"""
Information about the customer that's interacting with the cart. It includes details such as the
customer's email and phone number, and the total amount of money the customer has spent in the store.
This information helps personalize the checkout experience and ensures that accurate pricing and delivery options
are displayed to customers.
"""
type BuyerIdentity {
"""
The customer that's interacting with the cart. A customer is a buyer who has an
[account](https://help.shopify.com/manual/customers/customer-accounts) with the store.
"""
customer: Customer
"""
The email address of the customer that's interacting with the cart.
"""
email: String
"""
Whether the customer is authenticated through their
[customer account](https://help.shopify.com/manual/customers/customer-accounts).
If the customer is authenticated, then the `customer` field returns the customer's information.
If the customer isn't authenticated, then the `customer` field returns `null`.
"""
isAuthenticated: Boolean!
"""
The phone number of the customer that's interacting with the cart.
"""
phone: String
"""
The company of a B2B customer that's interacting with the cart.
Used to manage and track purchases made by businesses rather than individual customers.
"""
purchasingCompany: PurchasingCompany
}
"""
The cart where the Function is running. A cart contains the merchandise that a customer intends to purchase
and information about the customer, such as the customer's email address and phone number.
"""
type Cart {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
Information about the customer that's interacting with the cart. It includes details such as the
customer's email and phone number, and the total amount of money the customer has spent in the store.
This information helps personalize the checkout experience and ensures that accurate pricing and delivery options
are displayed to customers.
"""
buyerIdentity: BuyerIdentity
"""
A breakdown of the costs that the customer will pay at checkout. It includes the total amount,
the subtotal before taxes and duties, the tax amount, and duty charges.
"""
cost: CartCost!
"""
The items in a cart that are eligible for fulfillment and can be delivered to the customer.
"""
deliverableLines: [DeliverableCartLine!]!
"""
A collection of items that are grouped by shared delivery characteristics. Delivery groups streamline
fulfillment by organizing items that can be shipped together, based on the customer's
shipping address. For example, if a customer orders a t-shirt and a pair of shoes that can be shipped
together, then the items are included in the same delivery group.
In the [Order Discount](https://shopify.dev/docs/api/functions/reference/order-discounts) and
[Product Discount](https://shopify.dev/docs/api/functions/reference/product-discounts) legacy APIs,
the `cart.deliveryGroups` input is always an empty array. This means you can't access delivery groups when
creating Order Discount or Product Discount Functions. If you need to apply discounts to shipping costs,
then use the [Discount Function API](https://shopify.dev/docs/api/functions/reference/discount)
instead.
"""
deliveryGroups: [CartDeliveryGroup!]!
"""
The items in a cart that the customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
lines: [CartLine!]! @scaleLimits(rate: 0.005)
"""
The additional fields on the **Cart** page that are required for international orders in specific countries,
such as customs information or tax identification numbers.
"""
localizedFields(
"""
The keys of the localized fields to retrieve.
"""
keys: [LocalizedFieldKey!]! = []
): [LocalizedField!]!
}
"""
A breakdown of the costs that the customer will pay at checkout. It includes the total amount,
the subtotal before taxes and duties, the tax amount, and duty charges.
"""
type CartCost {
"""
The amount for the customer to pay at checkout, excluding taxes and discounts.
"""
subtotalAmount: MoneyV2!
"""
The total amount for the customer to pay at checkout.
"""
totalAmount: MoneyV2!
"""
The duty charges for a customer to pay at checkout.
"""
totalDutyAmount: MoneyV2
"""
The total tax amount for the customer to pay at checkout.
"""
totalTaxAmount: MoneyV2
}
"""
Information about items in a cart that are grouped by shared delivery characteristics.
Delivery groups streamline fulfillment by organizing items that can be shipped together, based on the customer's
shipping address. For example, if a customer orders a t-shirt and a pair of shoes that can be shipped
together, then the items are included in the same delivery group.
"""
type CartDeliveryGroup {
"""
Information about items in a cart that a customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
cartLines: [CartLine!]! @scaleLimits(rate: 0.005)
"""
The shipping or destination address associated with the delivery group.
"""
deliveryAddress: MailingAddress
"""
The delivery options available for the delivery group. Delivery options are the different ways that customers
can choose to have their orders shipped. Examples include express shipping or standard shipping.
"""
deliveryOptions: [CartDeliveryOption!]!
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the delivery group.
"""
id: ID!
"""
Information about the delivery option that the customer has selected.
"""
selectedDeliveryOption: CartDeliveryOption
}
"""
Information about a delivery option that's available for an item in a cart. Delivery options are the different
ways that customers can choose to have their orders shipped. Examples include express shipping or standard
shipping.
"""
type CartDeliveryOption {
"""
A unique identifier that represents the delivery option offered to customers.
For example, `Canada Post Expedited`.
"""
code: String
"""
The amount that the customer pays if they select the delivery option.
"""
cost: MoneyV2!
"""
The delivery method associated with the delivery option. A delivery method is a way that merchants can
fulfill orders from their online stores. Delivery methods include shipping to an address,
[local pickup](https://help.shopify.com/manual/fulfillment/setup/delivery-methods/pickup-in-store),
and shipping to a [pickup point](https://help.shopify.com/manual/fulfillment/shopify-shipping/pickup-points),
all of which are natively supported by Shopify checkout.
"""
deliveryMethodType: DeliveryMethod!
"""
A single-line description of the delivery option, with HTML tags removed.
"""
description: String
"""
A unique, human-readable identifier of the delivery option's title.
A handle can contain letters, hyphens (`-`), and numbers, but not spaces.
For example, `standard-shipping`.
"""
handle: Handle!
"""
The name of the delivery option that displays to customers. The title is used to construct the delivery
option's handle. For example, if a delivery option is titled "Standard Shipping", then the handle is
`standard-shipping`.
"""
title: String
}
"""
Information about an item in a cart that a customer intends to purchase. A cart line is an entry in the
customer's cart that represents a single unit of a product variant. For example, if a customer adds two
different sizes of the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
type CartLine {
"""
The custom attributes associated with a cart to store additional information. Cart attributes
allow you to collect specific information from customers on the **Cart** page, such as order notes,
gift wrapping requests, or custom product details. Attributes are stored as key-value pairs.
Cart line attributes are equivalent to the
[`line_item`](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
object in Liquid.
"""
attribute(
"""
The key of the cart attribute to retrieve. For example, `"gift_wrapping"`.
"""
key: String
): Attribute
"""
The cost of an item in a cart that the customer intends to purchase. Cart lines are entries in the customer's
cart that represent a single unit of a product variant. For example, if a customer adds two different sizes of
the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
cost: CartLineCost!
"""
The ID of the cart line.
"""
id: ID!
"""
The item that the customer intends to purchase.
"""
merchandise: Merchandise!
"""
The quantity of the item that the customer intends to purchase.
"""
quantity: Int!
"""
The [selling plan](https://shopify.dev/docs/apps/build/purchase-options/subscriptions/selling-plans)
associated with the cart line, including information about how a product variant can be sold and purchased.
"""
sellingPlanAllocation: SellingPlanAllocation
}
"""
The cost of an item in a cart that the customer intends to purchase. Cart lines are entries in the customer's
cart that represent a single unit of a product variant. For example, if a customer adds two different sizes of
the same t-shirt to their cart, then each size is represented as a separate cart line.
"""
type CartLineCost {
"""
The cost of a single unit. For example, if a customer purchases three units of a product
that are priced at $10 each, then the `amountPerQuantity` is $10.
"""
amountPerQuantity: MoneyV2!
"""
The cost of a single unit before any discounts are applied. This field is used to calculate and display
savings for customers. For example, if a product's `compareAtAmountPerQuantity` is $25 and its current price
is $20, then the customer sees a $5 discount. This value can change based on the buyer's identity and is
`null` when the value is hidden from buyers.
"""
compareAtAmountPerQuantity: MoneyV2
"""
The cost of items in the cart before applying any discounts to certain items.
This amount serves as the starting point for calculating any potential savings customers
might receive through promotions or discounts.
"""
subtotalAmount: MoneyV2!
"""
The total cost of items in a cart.
"""
totalAmount: MoneyV2!
}
"""
Whether the product is in the specified collection.
A collection is a group of products that can be displayed in online stores and other sales channels in
categories, which makes it easy for customers to find them. For example, an athletics store might create
different collections for running attire and accessories.
"""
type CollectionMembership {
"""
A [globally-unique ID](https://shopify.dev/docs/api/usage/gids)
for the collection.
"""
collectionId: ID!
"""
Whether the product is in the specified collection.
"""
isMember: Boolean!
}
"""
Represents information about a company which is also a customer of the shop.
"""
type Company implements HasMetafields {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was created in Shopify.
"""
createdAt: DateTime!
"""
A unique externally-supplied ID for the company.
"""
externalId: String
"""
The ID of the company.
"""
id: ID!
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as products, orders, and
[many more](https://shopify.dev/docs/api/admin-graphql/latest/enums/MetafieldOwnerType).
Using [metafields with Shopify Functions](https://shopify.dev/docs/apps/build/functions/input-output/metafields-for-input-queries)
enables you to customize the checkout experience.
"""
metafield(
"""
The unique identifier for the metafield within its namespace. A metafield is composed of a
namespace and a key, in the format `namespace.key`.
"""
key: String!
"""
A category that organizes a group of metafields. Namespaces are used to prevent naming conflicts
between different apps or different parts of the same app. If omitted, then the
[app-reserved namespace](https://shopify.dev/docs/apps/build/custom-data/ownership)
is used.
"""
namespace: String
): Metafield
"""
The name of the company.
"""
name: String!
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) at which the company was last modified.
"""
updatedAt: DateTime!
}
"""
A company's main point of contact.
"""
type CompanyContact {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company contact was created in Shopify.
"""
createdAt: DateTime!
"""
The ID of the company.
"""
id: ID!
"""
The company contact's locale (language).
"""
locale: String
"""
The company contact's job title.
"""
title: String
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company contact was last modified.
"""
updatedAt: DateTime!
}
"""
A company's location.
"""
type CompanyLocation implements HasMetafields {
"""
The date and time ([ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601))
at which the company location was created in Shopify.
"""
createdAt: DateTime!
"""
A unique externally-supplied ID for the company.
"""
externalId: String
"""
The ID of the company.
"""
id: ID!
"""
The preferred locale of the company location.
"""
locale: String
"""
A [custom field](https://shopify.dev/docs/apps/build/custom-data) that stores additional information
about a Shopify resource, such as prod
gitextract_2gpo66g9/
├── .github/
│ ├── ISSUE_TEMPLATE/
│ │ ├── config.yml
│ │ └── template-or-example-issue.md
│ ├── dependabot.yaml
│ └── workflows/
│ ├── cla.yml
│ ├── javascript.yml
│ ├── rust.yml
│ └── typescript.yml
├── .gitignore
├── .graphqlrc.cjs
├── CODE_OF_CONDUCT.md
├── Cargo.toml
├── LICENSE.md
├── README.md
├── checkout/
│ ├── javascript/
│ │ ├── cart-checkout-validation/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── cart-transform/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── delivery-customization/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ └── payment-customization/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ ├── src/
│ │ │ ├── index.liquid
│ │ │ ├── run.graphql.liquid
│ │ │ ├── run.liquid
│ │ │ └── run.test.liquid
│ │ └── vite.config.js
│ ├── rust/
│ │ ├── cart-checkout-validation/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── cart-transform/
│ │ │ ├── bundles/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── Cargo.toml.liquid
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json.liquid
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml.liquid
│ │ │ │ └── src/
│ │ │ │ ├── main.rs
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ └── run.rs
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── delivery-customization/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ └── payment-customization/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── Cargo.toml.liquid
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ ├── main.rs
│ │ ├── run.graphql.liquid
│ │ └── run.rs
│ └── wasm/
│ ├── cart-checkout-validation/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── cart-transform/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── delivery-customization/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ └── payment-customization/
│ └── default/
│ ├── locales/
│ │ └── en.default.json.liquid
│ ├── run.graphql.liquid
│ ├── schema.graphql
│ └── shopify.extension.toml.liquid
├── discounts/
│ ├── javascript/
│ │ ├── discount/
│ │ │ └── default/
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── cart_delivery_options_discounts_generate_run.graphql.liquid
│ │ │ │ ├── cart_delivery_options_discounts_generate_run.liquid
│ │ │ │ ├── cart_delivery_options_discounts_generate_run.test.liquid
│ │ │ │ ├── cart_lines_discounts_generate_run.graphql.liquid
│ │ │ │ ├── cart_lines_discounts_generate_run.liquid
│ │ │ │ ├── cart_lines_discounts_generate_run.test.liquid
│ │ │ │ └── index.liquid
│ │ │ └── vite.config.js
│ │ ├── discounts-allocator/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── order-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── product-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ └── shipping-discounts/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ ├── src/
│ │ │ ├── index.liquid
│ │ │ ├── run.graphql.liquid
│ │ │ ├── run.liquid
│ │ │ └── run.test.liquid
│ │ └── vite.config.js
│ ├── rust/
│ │ ├── discount/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── cart_delivery_options_discounts_generate_run.graphql.liquid
│ │ │ ├── cart_delivery_options_discounts_generate_run.rs
│ │ │ ├── cart_lines_discounts_generate_run.graphql.liquid
│ │ │ ├── cart_lines_discounts_generate_run.rs
│ │ │ └── main.rs
│ │ ├── discounts-allocator/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── order-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── product-discounts/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ └── shipping-discounts/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── Cargo.toml.liquid
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ ├── main.rs
│ │ ├── run.graphql.liquid
│ │ └── run.rs
│ └── wasm/
│ ├── discount/
│ │ └── default/
│ │ ├── cart_delivery_options_generate_run.graphql.liquid
│ │ ├── cart_lines_discounts_generate_run.graphql.liquid
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── discounts-allocator/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ └── run.graphql.liquid
│ ├── order-discounts/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── product-discounts/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ └── shipping-discounts/
│ └── default/
│ ├── locales/
│ │ └── en.default.json.liquid
│ ├── run.graphql.liquid
│ ├── schema.graphql
│ └── shopify.extension.toml.liquid
├── order-routing/
│ ├── javascript/
│ │ ├── fulfillment-constraints/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── local-pickup-delivery-option-generators/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ ├── location-rules/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── package.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ ├── src/
│ │ │ │ ├── index.liquid
│ │ │ │ ├── run.graphql.liquid
│ │ │ │ ├── run.liquid
│ │ │ │ └── run.test.liquid
│ │ │ └── vite.config.js
│ │ └── pickup-point-delivery-option-generators/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ ├── src/
│ │ │ ├── fetch.liquid
│ │ │ ├── fetch.test.liquid
│ │ │ ├── index.liquid
│ │ │ ├── run.liquid
│ │ │ └── run.test.liquid
│ │ └── vite.config.js
│ ├── rust/
│ │ ├── fulfillment-constraints/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── local-pickup-delivery-option-generators/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── metadata.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ ├── location-rules/
│ │ │ └── default/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml.liquid
│ │ │ ├── locales/
│ │ │ │ └── en.default.json.liquid
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml.liquid
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql.liquid
│ │ │ └── run.rs
│ │ └── pickup-point-delivery-option-generators/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── Cargo.toml.liquid
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ ├── fetch.rs
│ │ ├── main.rs
│ │ └── run.rs
│ ├── typescript/
│ │ └── pickup-point-delivery-option-generators/
│ │ └── default/
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── package.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── vite.config.js
│ └── wasm/
│ ├── fulfillment-constraints/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ ├── local-pickup-delivery-option-generators/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml.liquid
│ │ └── src/
│ │ └── run.graphql.liquid
│ ├── location-rules/
│ │ └── default/
│ │ ├── locales/
│ │ │ └── en.default.json.liquid
│ │ ├── run.graphql.liquid
│ │ ├── schema.graphql
│ │ └── shopify.extension.toml.liquid
│ └── pickup-point-delivery-option-generators/
│ └── default/
│ ├── fetch.graphql.liquid
│ ├── locales/
│ │ └── en.default.json.liquid
│ ├── run.graphql.liquid
│ ├── schema.graphql
│ └── shopify.extension.toml.liquid
├── package.json
├── sample-apps/
│ ├── bundles-cart-transform/
│ │ ├── .dockerignore
│ │ ├── .gitattributes
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── .ruby-version
│ │ ├── .vscode/
│ │ │ └── extensions.json
│ │ ├── Dockerfile
│ │ ├── GETTING_STARTED.md
│ │ ├── README.md
│ │ ├── entrypoint.sh
│ │ ├── extensions/
│ │ │ ├── cart-expand-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── input.graphql
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ └── index.test.js
│ │ │ └── cart-merge-expand_rust/
│ │ │ ├── Cargo.toml
│ │ │ ├── input.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── resources/
│ │ │ └── component_parents_schema.json
│ │ ├── shopify.app.toml
│ │ └── web/
│ │ ├── .gitignore
│ │ ├── Gemfile
│ │ ├── Rakefile
│ │ ├── app/
│ │ │ ├── assets/
│ │ │ │ ├── config/
│ │ │ │ │ └── manifest.js
│ │ │ │ ├── images/
│ │ │ │ │ └── .keep
│ │ │ │ └── stylesheets/
│ │ │ │ └── application.css
│ │ │ ├── channels/
│ │ │ │ └── application_cable/
│ │ │ │ ├── channel.rb
│ │ │ │ └── connection.rb
│ │ │ ├── controllers/
│ │ │ │ ├── application_controller.rb
│ │ │ │ ├── authenticated_controller.rb
│ │ │ │ ├── concerns/
│ │ │ │ │ └── .keep
│ │ │ │ ├── home_controller.rb
│ │ │ │ └── products_controller.rb
│ │ │ ├── helpers/
│ │ │ │ └── application_helper.rb
│ │ │ ├── javascript/
│ │ │ │ ├── application.js
│ │ │ │ └── lib/
│ │ │ │ ├── flash_messages.js
│ │ │ │ └── shopify_app.js
│ │ │ ├── jobs/
│ │ │ │ ├── app_uninstalled_job.rb
│ │ │ │ ├── application_job.rb
│ │ │ │ ├── customers_data_request_job.rb
│ │ │ │ ├── customers_redact_job.rb
│ │ │ │ ├── shop_redact_job.rb
│ │ │ │ └── shopify/
│ │ │ │ └── after_authenticate_job.rb
│ │ │ ├── mailers/
│ │ │ │ └── application_mailer.rb
│ │ │ ├── models/
│ │ │ │ ├── application_record.rb
│ │ │ │ ├── build_commands.rb
│ │ │ │ ├── concerns/
│ │ │ │ │ └── .keep
│ │ │ │ └── shop.rb
│ │ │ ├── services/
│ │ │ │ ├── application_service.rb
│ │ │ │ └── product_creator.rb
│ │ │ └── views/
│ │ │ └── layouts/
│ │ │ ├── _flash_messages.html.erb
│ │ │ ├── application.html.erb
│ │ │ ├── embedded_app.html.erb
│ │ │ ├── mailer.html.erb
│ │ │ └── mailer.text.erb
│ │ ├── bin/
│ │ │ ├── bundle
│ │ │ ├── importmap
│ │ │ ├── rails
│ │ │ ├── rake
│ │ │ └── setup
│ │ ├── config/
│ │ │ ├── application.rb
│ │ │ ├── boot.rb
│ │ │ ├── cable.yml
│ │ │ ├── database.yml
│ │ │ ├── environment.rb
│ │ │ ├── environments/
│ │ │ │ ├── development.rb
│ │ │ │ ├── production.rb
│ │ │ │ └── test.rb
│ │ │ ├── importmap.rb
│ │ │ ├── initializers/
│ │ │ │ ├── assets.rb
│ │ │ │ ├── content_security_policy.rb
│ │ │ │ ├── filter_parameter_logging.rb
│ │ │ │ ├── inflections.rb
│ │ │ │ ├── permissions_policy.rb
│ │ │ │ ├── session_store.rb
│ │ │ │ └── shopify_app.rb
│ │ │ ├── locales/
│ │ │ │ └── en.yml
│ │ │ ├── puma.rb
│ │ │ ├── routes.rb
│ │ │ └── storage.yml
│ │ ├── config.ru
│ │ ├── db/
│ │ │ ├── migrate/
│ │ │ │ ├── 20220609125627_create_shops.rb
│ │ │ │ ├── 20220609125631_add_shop_access_scopes_column.rb
│ │ │ │ └── 20230201144826_add_registered_to_shops.rb
│ │ │ ├── schema.rb
│ │ │ └── seeds.rb
│ │ ├── frontend/
│ │ │ ├── .gitignore
│ │ │ ├── App.jsx
│ │ │ ├── README.md
│ │ │ ├── Routes.jsx
│ │ │ ├── assets/
│ │ │ │ └── index.js
│ │ │ ├── components/
│ │ │ │ ├── ProductsCard.jsx
│ │ │ │ ├── index.js
│ │ │ │ └── providers/
│ │ │ │ ├── AppBridgeProvider.jsx
│ │ │ │ ├── PolarisProvider.jsx
│ │ │ │ ├── QueryProvider.jsx
│ │ │ │ └── index.js
│ │ │ ├── dev_embed.js
│ │ │ ├── hooks/
│ │ │ │ ├── index.js
│ │ │ │ ├── useAppQuery.js
│ │ │ │ └── useAuthenticatedFetch.js
│ │ │ ├── index.html
│ │ │ ├── index.jsx
│ │ │ ├── package.json
│ │ │ ├── pages/
│ │ │ │ ├── ExitIframe.jsx
│ │ │ │ ├── NotFound.jsx
│ │ │ │ ├── index.jsx
│ │ │ │ └── readme.jsx
│ │ │ ├── shopify.web.toml
│ │ │ └── vite.config.js
│ │ ├── lib/
│ │ │ ├── assets/
│ │ │ │ └── .keep
│ │ │ └── tasks/
│ │ │ └── build.rake
│ │ ├── log/
│ │ │ └── .keep
│ │ ├── public/
│ │ │ ├── 404.html
│ │ │ ├── 422.html
│ │ │ ├── 500.html
│ │ │ ├── dist/
│ │ │ │ └── .keep
│ │ │ └── robots.txt
│ │ ├── rubocop.yml
│ │ ├── shopify.web.toml
│ │ ├── storage/
│ │ │ └── .keep
│ │ ├── template.rb
│ │ ├── test/
│ │ │ ├── application_system_test_case.rb
│ │ │ ├── channels/
│ │ │ │ └── application_cable/
│ │ │ │ └── connection_test.rb
│ │ │ ├── fixtures/
│ │ │ │ └── files/
│ │ │ │ └── .keep
│ │ │ ├── helpers/
│ │ │ │ └── .keep
│ │ │ ├── integration/
│ │ │ │ └── .keep
│ │ │ ├── mailers/
│ │ │ │ └── .keep
│ │ │ ├── models/
│ │ │ │ └── .keep
│ │ │ ├── system/
│ │ │ │ └── .keep
│ │ │ └── test_helper.rb
│ │ ├── tmp/
│ │ │ ├── .keep
│ │ │ ├── pids/
│ │ │ │ └── .keep
│ │ │ └── storage/
│ │ │ └── .keep
│ │ └── vendor/
│ │ ├── .keep
│ │ └── javascript/
│ │ └── .keep
│ ├── bundles-price-per-component/
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── README.md
│ │ ├── extensions/
│ │ │ ├── price-per-component-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── price-per-component-rs/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ ├── run.input.json
│ │ │ ├── run.output.json
│ │ │ └── run.rs
│ │ ├── package.json
│ │ └── shopify.app.toml
│ ├── delivery-customizations/
│ │ ├── .dockerignore
│ │ ├── .editorconfig
│ │ ├── .eslintignore
│ │ ├── .eslintrc.cjs
│ │ ├── .gitignore
│ │ ├── .graphqlrc.ts
│ │ ├── .npmrc
│ │ ├── .prettierignore
│ │ ├── CHANGELOG.md
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── db.server.ts
│ │ │ ├── entry.server.tsx
│ │ │ ├── globals.d.ts
│ │ │ ├── root.tsx
│ │ │ ├── routes/
│ │ │ │ ├── _index/
│ │ │ │ │ ├── route.tsx
│ │ │ │ │ └── styles.module.css
│ │ │ │ ├── app._index.tsx
│ │ │ │ ├── app.additional.tsx
│ │ │ │ ├── app.delivery-customization.$functionId.$id.tsx
│ │ │ │ ├── app.tsx
│ │ │ │ ├── auth.$.tsx
│ │ │ │ ├── auth.login/
│ │ │ │ │ ├── error.server.tsx
│ │ │ │ │ └── route.tsx
│ │ │ │ ├── webhooks.app.scopes_update.tsx
│ │ │ │ └── webhooks.app.uninstalled.tsx
│ │ │ ├── routes.ts
│ │ │ └── shopify.server.ts
│ │ ├── env.d.ts
│ │ ├── extensions/
│ │ │ ├── delivery-customization-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── delivery-customization-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── prisma/
│ │ │ ├── migrations/
│ │ │ │ └── 20240530213853_create_session_table/
│ │ │ │ └── migration.sql
│ │ │ └── schema.prisma
│ │ ├── react-router.config.ts
│ │ ├── shopify.app.toml
│ │ ├── shopify.web.toml
│ │ ├── tsconfig.json
│ │ └── vite.config.ts
│ ├── discounts/
│ │ ├── .dockerignore
│ │ ├── .editorconfig
│ │ ├── .eslintignore
│ │ ├── .eslintrc.js
│ │ ├── .gitignore
│ │ ├── .graphqlrc.js
│ │ ├── .npmrc
│ │ ├── .prettierignore
│ │ ├── .vscode/
│ │ │ └── extensions.json
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── components/
│ │ │ │ ├── NotFoundPage/
│ │ │ │ │ ├── NotFoundPage.jsx
│ │ │ │ │ └── index.js
│ │ │ │ └── providers/
│ │ │ │ └── DiscountProvider.jsx
│ │ │ ├── db.server.js
│ │ │ ├── entry.server.jsx
│ │ │ ├── root.jsx
│ │ │ ├── routes/
│ │ │ │ ├── _index/
│ │ │ │ │ ├── route.jsx
│ │ │ │ │ └── style.css
│ │ │ │ ├── app._index.jsx
│ │ │ │ ├── app.additional.jsx
│ │ │ │ ├── app.jsx
│ │ │ │ ├── app.volume-discount.$functionId.$id.jsx
│ │ │ │ ├── app.volume-discount.$functionId.new.jsx
│ │ │ │ ├── auth.$.jsx
│ │ │ │ ├── auth.login/
│ │ │ │ │ ├── error.server.jsx
│ │ │ │ │ └── route.jsx
│ │ │ │ └── webhooks.jsx
│ │ │ ├── shopify.server.js
│ │ │ └── utils/
│ │ │ └── navigation.js
│ │ ├── extensions/
│ │ │ ├── product-discount-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── product-discount-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── prisma/
│ │ │ ├── migrations/
│ │ │ │ └── 20230615155147_create_session_table/
│ │ │ │ └── migration.sql
│ │ │ └── schema.prisma
│ │ ├── remix.config.js
│ │ ├── shopify.app.toml
│ │ ├── shopify.web.toml
│ │ └── tsconfig.json
│ ├── optional-add-ons-cart-transform/
│ │ ├── .gitignore
│ │ ├── .npmrc
│ │ ├── README.md
│ │ ├── extensions/
│ │ │ ├── optional-add-ons-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── optional-add-ons-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ └── shopify.app.toml
│ ├── payment-customizations/
│ │ ├── .dockerignore
│ │ ├── .editorconfig
│ │ ├── .eslintignore
│ │ ├── .eslintrc.cjs
│ │ ├── .gitignore
│ │ ├── .graphqlrc.js
│ │ ├── .npmrc
│ │ ├── .prettierignore
│ │ ├── Dockerfile
│ │ ├── README.md
│ │ ├── app/
│ │ │ ├── db.server.js
│ │ │ ├── entry.server.jsx
│ │ │ ├── root.jsx
│ │ │ ├── routes/
│ │ │ │ ├── _index/
│ │ │ │ │ ├── route.jsx
│ │ │ │ │ └── styles.module.css
│ │ │ │ ├── app._index.jsx
│ │ │ │ ├── app.additional.jsx
│ │ │ │ ├── app.jsx
│ │ │ │ ├── app.payment-customization.$functionId.$id.jsx
│ │ │ │ ├── auth.$.jsx
│ │ │ │ ├── auth.login/
│ │ │ │ │ ├── error.server.js
│ │ │ │ │ └── route.jsx
│ │ │ │ ├── webhooks.app.scopes_update.jsx
│ │ │ │ └── webhooks.app.uninstalled.jsx
│ │ │ ├── routes.js
│ │ │ └── shopify.server.js
│ │ ├── extensions/
│ │ │ ├── payment-customization-js/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── locales/
│ │ │ │ │ └── en.default.json
│ │ │ │ ├── package.json
│ │ │ │ ├── schema.graphql
│ │ │ │ ├── shopify.extension.toml
│ │ │ │ └── src/
│ │ │ │ ├── index.js
│ │ │ │ ├── run.graphql
│ │ │ │ ├── run.js
│ │ │ │ └── run.test.js
│ │ │ └── payment-customization-rust/
│ │ │ ├── .gitignore
│ │ │ ├── Cargo.toml
│ │ │ ├── locales/
│ │ │ │ └── en.default.json
│ │ │ ├── schema.graphql
│ │ │ ├── shopify.extension.toml
│ │ │ └── src/
│ │ │ ├── main.rs
│ │ │ ├── run.graphql
│ │ │ └── run.rs
│ │ ├── package.json
│ │ ├── prisma/
│ │ │ ├── migrations/
│ │ │ │ └── 20240530213853_create_session_table/
│ │ │ │ └── migration.sql
│ │ │ └── schema.prisma
│ │ ├── react-router.config.js
│ │ ├── shopify.app.toml
│ │ ├── shopify.web.toml
│ │ ├── tsconfig.json
│ │ └── vite.config.js
│ └── update-line-item/
│ ├── .gitignore
│ ├── .npmrc
│ ├── README.md
│ ├── extensions/
│ │ └── update-line-item-js/
│ │ ├── .gitignore
│ │ ├── package.json
│ │ ├── schema.graphql
│ │ ├── shopify.extension.toml
│ │ └── src/
│ │ ├── index.js
│ │ ├── run.graphql
│ │ ├── run.js
│ │ └── run.test.js
│ ├── package.json
│ └── shopify.app.toml
└── util/
└── expand-liquid.js
SYMBOL INDEX (283 symbols across 127 files)
FILE: .graphqlrc.cjs
function getProjects (line 6) | function getProjects(path) {
FILE: checkout/rust/cart-checkout-validation/default/src/main.rs
function main (line 4) | fn main() {
FILE: checkout/rust/cart-checkout-validation/default/src/run.rs
type Config (line 8) | struct Config {}
function run (line 11) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_single_error_when_quantity_exceeds_one (line 35) | fn test_result_contains_single_error_when_quantity_exceeds_one() -> Resu...
function test_result_contains_no_errors_when_quantity_is_one (line 64) | fn test_result_contains_no_errors_when_quantity_is_one() -> Result<()> {
FILE: checkout/rust/cart-transform/bundles/src/main.rs
function main (line 4) | fn main() {
FILE: checkout/rust/cart-transform/bundles/src/run.rs
type URL (line 16) | type URL = String;
type ComponentParent (line 19) | struct ComponentParent {
type ComponentParentMetafield (line 27) | pub struct ComponentParentMetafield {
type ComponentParentMetafieldReference (line 35) | pub struct ComponentParentMetafieldReference {
type ComponentParentMetafieldQuantities (line 40) | pub struct ComponentParentMetafieldQuantities {
type ComponentParentMetafieldPriceAdjustment (line 45) | pub struct ComponentParentMetafieldPriceAdjustment {
function run (line 50) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function get_merge_cart_operations (line 62) | fn get_merge_cart_operations(cart: &Cart) -> impl Iterator<Item = CartOp...
function get_components_in_cart (line 97) | fn get_components_in_cart(cart: &Cart, definition: &ComponentParent) -> ...
function get_merge_parent_definitions (line 113) | fn get_merge_parent_definitions(cart: &Cart) -> Vec<ComponentParent> {
function get_component_parents (line 126) | fn get_component_parents(
function get_expand_cart_operations (line 155) | fn get_expand_cart_operations(cart: &Cart) -> impl Iterator<Item = CartO...
function get_component_quantities (line 194) | fn get_component_quantities(variant: &InputCartLinesMerchandiseOnProduct...
function get_component_references (line 202) | fn get_component_references(variant: &InputCartLinesMerchandiseOnProduct...
function get_price_adjustment (line 210) | fn get_price_adjustment(
FILE: checkout/rust/cart-transform/default/src/main.rs
function main (line 4) | fn main() {
FILE: checkout/rust/cart-transform/default/src/run.rs
type URL (line 5) | type URL = String;
function run (line 8) | fn run(_input: input::ResponseData) -> Result<output::FunctionRunResult> {
FILE: checkout/rust/delivery-customization/default/src/main.rs
function main (line 4) | fn main() {
FILE: checkout/rust/delivery-customization/default/src/run.rs
type Configuration (line 8) | struct Configuration {}
method from_str (line 11) | fn from_str(value: &str) -> Self {
function run (line 17) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_operations (line 36) | fn test_result_contains_no_operations() -> Result<()> {
FILE: checkout/rust/payment-customization/default/src/main.rs
function main (line 4) | fn main() {
FILE: checkout/rust/payment-customization/default/src/run.rs
type Configuration (line 8) | struct Configuration {}
method from_str (line 11) | fn from_str(value: &str) -> Self {
function run (line 17) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_operations (line 36) | fn test_result_contains_no_operations() -> Result<()> {
FILE: discounts/rust/discount/default/src/cart_delivery_options_discounts_generate_run.rs
function cart_delivery_options_discounts_generate_run (line 8) | fn cart_delivery_options_discounts_generate_run(
FILE: discounts/rust/discount/default/src/cart_lines_discounts_generate_run.rs
function cart_lines_discounts_generate_run (line 8) | fn cart_lines_discounts_generate_run(
FILE: discounts/rust/discount/default/src/main.rs
function main (line 5) | fn main() {
FILE: discounts/rust/discounts-allocator/default/src/main.rs
function main (line 4) | fn main() {
FILE: discounts/rust/discounts-allocator/default/src/run.rs
function run (line 5) | fn run(_input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_with_no_discounts (line 20) | fn test_result_with_no_discounts() -> Result<()> {
FILE: discounts/rust/order-discounts/default/src/main.rs
function main (line 4) | fn main() {
FILE: discounts/rust/order-discounts/default/src/run.rs
type Configuration (line 8) | struct Configuration {}
method from_str (line 11) | fn from_str(value: &str) -> Self {
function run (line 17) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_discounts (line 40) | fn test_result_contains_no_discounts() -> Result<()> {
FILE: discounts/rust/product-discounts/default/src/main.rs
function main (line 4) | fn main() {
FILE: discounts/rust/product-discounts/default/src/run.rs
type Configuration (line 8) | struct Configuration {}
method from_str (line 11) | fn from_str(value: &str) -> Self {
function run (line 17) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_discounts (line 40) | fn test_result_contains_no_discounts() -> Result<()> {
FILE: discounts/rust/shipping-discounts/default/src/main.rs
function main (line 4) | fn main() {
FILE: discounts/rust/shipping-discounts/default/src/run.rs
type Configuration (line 8) | struct Configuration {}
method from_str (line 11) | fn from_str(value: &str) -> Self {
function run (line 17) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_discounts (line 34) | fn test_result_contains_no_discounts() -> Result<()> {
FILE: order-routing/rust/fulfillment-constraints/default/src/main.rs
function main (line 4) | fn main() {
FILE: order-routing/rust/fulfillment-constraints/default/src/run.rs
type Config (line 8) | struct Config {}
function run (line 11) | fn run(_input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_operations (line 25) | fn test_result_contains_no_operations() -> Result<()> {
FILE: order-routing/rust/local-pickup-delivery-option-generators/default/src/main.rs
function main (line 4) | fn main() {
FILE: order-routing/rust/local-pickup-delivery-option-generators/default/src/run.rs
type Config (line 8) | struct Config {}
function run (line 11) | fn run(_input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_contains_no_operations (line 36) | fn test_result_contains_no_operations() -> Result<()> {
FILE: order-routing/rust/location-rules/default/src/main.rs
function main (line 4) | fn main() {
FILE: order-routing/rust/location-rules/default/src/run.rs
type Config (line 8) | struct Config {}
function run (line 11) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_result_ranks_all_locations_zero (line 43) | fn test_result_ranks_all_locations_zero() -> Result<()> {
FILE: order-routing/rust/pickup-point-delivery-option-generators/default/src/fetch.rs
function fetch (line 5) | fn fetch(input: fetch::input::ResponseData) -> Result<fetch::output::Fun...
function build_external_api_request (line 22) | fn build_external_api_request(latitude: &f64, longitude: &f64) -> fetch:...
function test_fetch_returns_request_when_country_is_canada (line 50) | fn test_fetch_returns_request_when_country_is_canada() -> Result<()> {
function test_fetch_returns_no_request_when_country_is_not_canada (line 90) | fn test_fetch_returns_no_request_when_country_is_not_canada() -> Result<...
FILE: order-routing/rust/pickup-point-delivery-option-generators/default/src/main.rs
function main (line 5) | fn main() {
FILE: order-routing/rust/pickup-point-delivery-option-generators/default/src/run.rs
type TimeWithoutTimezone (line 6) | type TimeWithoutTimezone = String;
function run (line 9) | fn run(input: run::input::ResponseData) -> Result<run::output::FunctionR...
function build_pickup_point_delivery_option_operations (line 25) | fn build_pickup_point_delivery_option_operations(
function build_pickup_point_delivery_option (line 37) | fn build_pickup_point_delivery_option(
function build_provider (line 59) | fn build_provider() -> run::output::Provider {
function build_address (line 66) | fn build_address(external_api_delivery_point: &Value) -> Option<run::out...
function build_business_hours (line 127) | fn build_business_hours(
function format_time (line 167) | fn format_time(time: &str) -> TimeWithoutTimezone {
function test_result_has_pickup_point_delivery_options_when_receiving_fetch_result_for_successful_response (line 201) | fn test_result_has_pickup_point_delivery_options_when_receiving_fetch_re...
function test_result_has_no_pickup_point_delivery_options_when_receiving_fetch_result_for_failed_response (line 339) | fn test_result_has_no_pickup_point_delivery_options_when_receiving_fetch...
function test_result_has_pickup_point_delivery_option_with_null_business_hours_when_fetch_result_has_null_opening_hours (line 361) | fn test_result_has_pickup_point_delivery_option_with_null_business_hours...
FILE: sample-apps/bundles-cart-transform/extensions/cart-expand-js/src/index.js
constant NO_CHANGES (line 21) | const NO_CHANGES = {
function optionallyBuildExpandOperation (line 47) | function optionallyBuildExpandOperation({ id: cartLineId, merchandise }) {
FILE: sample-apps/bundles-cart-transform/extensions/cart-merge-expand_rust/src/main.rs
function main (line 4) | fn main() {
FILE: sample-apps/bundles-cart-transform/extensions/cart-merge-expand_rust/src/run.rs
type ComponentParent (line 12) | struct ComponentParent {
type ComponentParentMetafield (line 20) | pub struct ComponentParentMetafield {
type ComponentParentMetafieldReference (line 28) | pub struct ComponentParentMetafieldReference {
type ComponentParentMetafieldQuantities (line 33) | pub struct ComponentParentMetafieldQuantities {
type ComponentParentMetafieldPriceAdjustment (line 38) | pub struct ComponentParentMetafieldPriceAdjustment {
function run (line 43) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function get_merge_cart_operations (line 55) | fn get_merge_cart_operations(cart: &Cart) -> impl Iterator<Item = CartOp...
function get_components_in_cart (line 98) | fn get_components_in_cart(
function update_cart_lines_from_function_result (line 121) | fn update_cart_lines_from_function_result(
function get_merge_parent_definitions (line 149) | fn get_merge_parent_definitions(cart: &Cart) -> Vec<ComponentParent> {
function get_component_parents (line 161) | fn get_component_parents(
function get_expand_cart_operations (line 190) | fn get_expand_cart_operations(cart: &Cart) -> impl Iterator<Item = CartO...
function get_component_quantities (line 229) | fn get_component_quantities(variant: &InputCartLinesMerchandiseOnProduct...
function get_component_references (line 237) | fn get_component_references(variant: &InputCartLinesMerchandiseOnProduct...
function get_price_adjustment (line 245) | fn get_price_adjustment(
FILE: sample-apps/bundles-cart-transform/web/app/channels/application_cable/channel.rb
type ApplicationCable (line 3) | module ApplicationCable
class Channel (line 4) | class Channel < ActionCable::Channel::Base
FILE: sample-apps/bundles-cart-transform/web/app/channels/application_cable/connection.rb
type ApplicationCable (line 3) | module ApplicationCable
class Connection (line 4) | class Connection < ActionCable::Connection::Base
FILE: sample-apps/bundles-cart-transform/web/app/controllers/application_controller.rb
class ApplicationController (line 3) | class ApplicationController < ActionController::Base
FILE: sample-apps/bundles-cart-transform/web/app/controllers/authenticated_controller.rb
class AuthenticatedController (line 3) | class AuthenticatedController < ApplicationController
FILE: sample-apps/bundles-cart-transform/web/app/controllers/home_controller.rb
class HomeController (line 3) | class HomeController < ApplicationController
method index (line 11) | def index
FILE: sample-apps/bundles-cart-transform/web/app/controllers/products_controller.rb
class ProductsController (line 3) | class ProductsController < AuthenticatedController
method count (line 4) | def count
method create (line 8) | def create
FILE: sample-apps/bundles-cart-transform/web/app/helpers/application_helper.rb
type ApplicationHelper (line 3) | module ApplicationHelper
FILE: sample-apps/bundles-cart-transform/web/app/jobs/app_uninstalled_job.rb
class AppUninstalledJob (line 3) | class AppUninstalledJob < ActiveJob::Base
method handle (line 7) | def handle(topic:, shop:, body:)
method perform (line 12) | def perform(topic:, shop_domain:, webhook:)
FILE: sample-apps/bundles-cart-transform/web/app/jobs/application_job.rb
class ApplicationJob (line 3) | class ApplicationJob < ActiveJob::Base
FILE: sample-apps/bundles-cart-transform/web/app/jobs/customers_data_request_job.rb
class CustomersDataRequestJob (line 3) | class CustomersDataRequestJob < ActiveJob::Base
method handle (line 7) | def handle(topic:, shop:, body:)
method perform (line 12) | def perform(topic:, shop_domain:, webhook:)
FILE: sample-apps/bundles-cart-transform/web/app/jobs/customers_redact_job.rb
class CustomersRedactJob (line 3) | class CustomersRedactJob < ActiveJob::Base
method handle (line 7) | def handle(topic:, shop:, body:)
method perform (line 12) | def perform(topic:, shop_domain:, webhook:)
FILE: sample-apps/bundles-cart-transform/web/app/jobs/shop_redact_job.rb
class ShopRedactJob (line 3) | class ShopRedactJob < ActiveJob::Base
method handle (line 7) | def handle(topic:, shop:, body:)
method perform (line 12) | def perform(topic:, shop_domain:, webhook:)
FILE: sample-apps/bundles-cart-transform/web/app/jobs/shopify/after_authenticate_job.rb
type Shopify (line 3) | module Shopify
class AfterAuthenticateJob (line 4) | class AfterAuthenticateJob < ActiveJob::Base
method perform (line 5) | def perform(shop_domain:)
FILE: sample-apps/bundles-cart-transform/web/app/mailers/application_mailer.rb
class ApplicationMailer (line 3) | class ApplicationMailer < ActionMailer::Base
FILE: sample-apps/bundles-cart-transform/web/app/models/application_record.rb
class ApplicationRecord (line 3) | class ApplicationRecord < ActiveRecord::Base
FILE: sample-apps/bundles-cart-transform/web/app/models/build_commands.rb
class BuildCommands (line 3) | class BuildCommands
method initialize (line 6) | def initialize(shop)
method install_function (line 11) | def install_function
method destroy_function (line 49) | def destroy_function(cart_transform_id)
method products (line 78) | def products
FILE: sample-apps/bundles-cart-transform/web/app/models/shop.rb
class Shop (line 3) | class Shop < ActiveRecord::Base
method api_version (line 6) | def api_version
FILE: sample-apps/bundles-cart-transform/web/app/services/application_service.rb
class ApplicationService (line 3) | class ApplicationService
method call (line 5) | def call(*args, **kwargs, &block)
FILE: sample-apps/bundles-cart-transform/web/app/services/product_creator.rb
class ProductCreator (line 3) | class ProductCreator < ApplicationService
method initialize (line 16) | def initialize(count:, session: ShopifyAPI::Context.active_session)
method call (line 22) | def call
method random_title (line 40) | def random_title
method random_price (line 47) | def random_price
FILE: sample-apps/bundles-cart-transform/web/config/application.rb
type ShopifyAppTemplateRuby (line 11) | module ShopifyAppTemplateRuby
class Application (line 12) | class Application < Rails::Application
FILE: sample-apps/bundles-cart-transform/web/config/initializers/shopify_app.rb
function add_privacy_webhooks (line 69) | def add_privacy_webhooks
FILE: sample-apps/bundles-cart-transform/web/db/migrate/20220609125627_create_shops.rb
class CreateShops (line 1) | class CreateShops < ActiveRecord::Migration[7.0]
method up (line 2) | def self.up
method down (line 12) | def self.down
FILE: sample-apps/bundles-cart-transform/web/db/migrate/20220609125631_add_shop_access_scopes_column.rb
class AddShopAccessScopesColumn (line 1) | class AddShopAccessScopesColumn < ActiveRecord::Migration[7.0]
method change (line 2) | def change
FILE: sample-apps/bundles-cart-transform/web/db/migrate/20230201144826_add_registered_to_shops.rb
class AddRegisteredToShops (line 3) | class AddRegisteredToShops < ActiveRecord::Migration[7.0]
method change (line 4) | def change
FILE: sample-apps/bundles-cart-transform/web/frontend/App.jsx
function App (line 11) | function App() {
FILE: sample-apps/bundles-cart-transform/web/frontend/Routes.jsx
function Routes (line 17) | function Routes({ pages }) {
function useRoutes (line 29) | function useRoutes(pages) {
FILE: sample-apps/bundles-cart-transform/web/frontend/components/ProductsCard.jsx
function ProductsCard (line 12) | function ProductsCard() {
FILE: sample-apps/bundles-cart-transform/web/frontend/components/providers/AppBridgeProvider.jsx
function AppBridgeProvider (line 15) | function AppBridgeProvider({ children }) {
FILE: sample-apps/bundles-cart-transform/web/frontend/components/providers/PolarisProvider.jsx
function AppBridgeLink (line 7) | function AppBridgeLink({ url, children, external, ...rest }) {
function PolarisProvider (line 50) | function PolarisProvider({ children }) {
FILE: sample-apps/bundles-cart-transform/web/frontend/components/providers/QueryProvider.jsx
function QueryProvider (line 12) | function QueryProvider({ children }) {
FILE: sample-apps/bundles-cart-transform/web/frontend/hooks/useAuthenticatedFetch.js
function useAuthenticatedFetch (line 17) | function useAuthenticatedFetch() {
function checkHeadersForReauthorization (line 28) | function checkHeadersForReauthorization(headers, app) {
FILE: sample-apps/bundles-cart-transform/web/frontend/pages/ExitIframe.jsx
function ExitIframe (line 6) | function ExitIframe() {
FILE: sample-apps/bundles-cart-transform/web/frontend/pages/NotFound.jsx
function NotFound (line 4) | function NotFound() {
FILE: sample-apps/bundles-cart-transform/web/frontend/pages/index.jsx
function HomePage (line 17) | function HomePage() {
FILE: sample-apps/bundles-cart-transform/web/frontend/pages/readme.jsx
function ReadMe (line 4) | function ReadMe() {
FILE: sample-apps/bundles-cart-transform/web/test/application_system_test_case.rb
class ApplicationSystemTestCase (line 5) | class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
FILE: sample-apps/bundles-cart-transform/web/test/channels/application_cable/connection_test.rb
class ApplicationCable::ConnectionTest (line 5) | class ApplicationCable::ConnectionTest < ActionCable::Connection::TestCase
FILE: sample-apps/bundles-cart-transform/web/test/test_helper.rb
class ActiveSupport::TestCase (line 10) | class ActiveSupport::TestCase
FILE: sample-apps/bundles-price-per-component/extensions/price-per-component-js/src/run.js
constant NO_CHANGES (line 21) | const NO_CHANGES = {
function run (line 29) | function run(input) {
function optionallyBuildExpandOperation (line 51) | function optionallyBuildExpandOperation({ id: cartLineId, merchandise },...
FILE: sample-apps/bundles-price-per-component/extensions/price-per-component-rs/src/main.rs
function main (line 4) | fn main() {
FILE: sample-apps/bundles-price-per-component/extensions/price-per-component-rs/src/run.rs
function run (line 15) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function get_update_cart_operations (line 25) | fn get_update_cart_operations(cart: &Cart, presentment_currency_rate: f6...
function parse_bundle_components (line 53) | fn parse_bundle_components(bundle_data: &str) -> Option<Vec<Value>> {
function create_expanded_items (line 60) | fn create_expanded_items(
FILE: sample-apps/delivery-customizations/.graphqlrc.ts
function getConfig (line 6) | function getConfig() {
FILE: sample-apps/delivery-customizations/app/entry.server.tsx
function handleRequest (line 11) | async function handleRequest(
FILE: sample-apps/delivery-customizations/app/root.tsx
function App (line 3) | function App() {
FILE: sample-apps/delivery-customizations/app/routes/_index/route.tsx
function App (line 19) | function App() {
FILE: sample-apps/delivery-customizations/app/routes/app._index.tsx
function Index (line 87) | function Index() {
FILE: sample-apps/delivery-customizations/app/routes/app.additional.tsx
function AdditionalPage (line 3) | function AdditionalPage() {
FILE: sample-apps/delivery-customizations/app/routes/app.delivery-customization.$functionId.$id.tsx
type LoaderData (line 12) | interface LoaderData {
type ActionData (line 17) | interface ActionData {
type DeliveryCustomizationData (line 21) | interface DeliveryCustomizationData {
function DeliveryCustomization (line 152) | function DeliveryCustomization() {
FILE: sample-apps/delivery-customizations/app/routes/app.tsx
function App (line 15) | function App() {
function ErrorBoundary (line 30) | function ErrorBoundary() {
FILE: sample-apps/delivery-customizations/app/routes/auth.login/error.server.tsx
type LoginErrorMessage (line 4) | interface LoginErrorMessage {
function loginErrorMessage (line 8) | function loginErrorMessage(loginErrors: LoginError): LoginErrorMessage {
FILE: sample-apps/delivery-customizations/app/routes/auth.login/route.tsx
function Auth (line 23) | function Auth() {
FILE: sample-apps/delivery-customizations/extensions/delivery-customization-js/src/run.js
constant NO_CHANGES (line 12) | const NO_CHANGES = {
function run (line 20) | function run(input) {
FILE: sample-apps/delivery-customizations/extensions/delivery-customization-rust/src/main.rs
function main (line 4) | fn main() {
FILE: sample-apps/delivery-customizations/extensions/delivery-customization-rust/src/run.rs
type Configuration (line 9) | struct Configuration {
method from_str (line 16) | fn from_str(value: &str) -> Self {
function run (line 22) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_returns_no_operations_without_configuration (line 72) | fn test_returns_no_operations_without_configuration() -> Result<()> {
function test_renames_delivery_options_if_province_matches (line 95) | fn test_renames_delivery_options_if_province_matches() -> Result<()> {
function test_returns_no_operations_if_province_code_does_not_match (line 142) | fn test_returns_no_operations_if_province_code_does_not_match() -> Resul...
FILE: sample-apps/delivery-customizations/prisma/migrations/20240530213853_create_session_table/migration.sql
type "Session" (line 2) | CREATE TABLE "Session" (
FILE: sample-apps/discounts/.graphqlrc.js
function getConfig (line 4) | function getConfig() {
FILE: sample-apps/discounts/app/components/NotFoundPage/NotFoundPage.jsx
function NotFoundPage (line 4) | function NotFoundPage() {
FILE: sample-apps/discounts/app/components/providers/DiscountProvider.jsx
function DiscountProvider (line 4) | function DiscountProvider({ children }) {
FILE: sample-apps/discounts/app/entry.server.jsx
constant ABORT_DELAY (line 8) | const ABORT_DELAY = 5_000;
function handleRequest (line 10) | async function handleRequest(
FILE: sample-apps/discounts/app/root.jsx
function loader (line 12) | async function loader() {
function App (line 17) | function App() {
FILE: sample-apps/discounts/app/routes/_index/route.jsx
function loader (line 10) | async function loader({ request }) {
function App (line 20) | function App() {
FILE: sample-apps/discounts/app/routes/app._index.jsx
function action (line 31) | async function action({ request }) {
function Index (line 76) | function Index() {
FILE: sample-apps/discounts/app/routes/app.additional.jsx
function AdditionalPage (line 12) | function AdditionalPage() {
function Code (line 65) | function Code({ children }) {
FILE: sample-apps/discounts/app/routes/app.jsx
function loader (line 13) | async function loader({ request }) {
function App (line 24) | function App() {
function ErrorBoundary (line 43) | function ErrorBoundary() {
FILE: sample-apps/discounts/app/routes/app.volume-discount.$functionId.$id.jsx
function VolumeEdit (line 247) | function VolumeEdit() {
FILE: sample-apps/discounts/app/routes/app.volume-discount.$functionId.new.jsx
function VolumeNew (line 153) | function VolumeNew() {
FILE: sample-apps/discounts/app/routes/auth.$.jsx
function loader (line 3) | async function loader({ request }) {
FILE: sample-apps/discounts/app/routes/auth.login/error.server.jsx
function loginErrorMessage (line 3) | function loginErrorMessage(loginErrors) {
FILE: sample-apps/discounts/app/routes/auth.login/route.jsx
function loader (line 21) | async function loader({ request }) {
function action (line 30) | async function action({ request }) {
function Auth (line 38) | function Auth() {
FILE: sample-apps/discounts/app/utils/navigation.js
function returnToDiscounts (line 1) | function returnToDiscounts () {
FILE: sample-apps/discounts/extensions/product-discount-js/src/run.js
constant EMPTY_DISCOUNT (line 14) | const EMPTY_DISCOUNT = {
function run (line 23) | function run(input) {
FILE: sample-apps/discounts/extensions/product-discount-rust/src/main.rs
function main (line 4) | fn main() {
FILE: sample-apps/discounts/extensions/product-discount-rust/src/run.rs
type Configuration (line 8) | struct Configuration {
constant DEFAULT_QUANTITY (line 14) | const DEFAULT_QUANTITY: i64 = 999;
constant DEFAULT_PERCENTAGE (line 15) | const DEFAULT_PERCENTAGE: f64 = 0.0;
method from_str (line 17) | fn from_str(value: &str) -> Self {
method default (line 23) | fn default() -> Self {
function run (line 32) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_no_metafield_result_contains_no_discounts (line 83) | fn test_no_metafield_result_contains_no_discounts() -> Result<()> {
function test_quantity_unmet_result_contains_no_discounts (line 112) | fn test_quantity_unmet_result_contains_no_discounts() -> Result<()> {
function test_quantity_met_discounts_variants (line 143) | fn test_quantity_met_discounts_variants() -> Result<()> {
FILE: sample-apps/discounts/prisma/migrations/20230615155147_create_session_table/migration.sql
type "Session" (line 2) | CREATE TABLE "Session" (
FILE: sample-apps/optional-add-ons-cart-transform/extensions/optional-add-ons-js/src/run.js
constant NO_CHANGES (line 17) | const NO_CHANGES = {
function run (line 25) | function run(input) {
function optionallyBuildExpandOperation (line 47) | function optionallyBuildExpandOperation(
FILE: sample-apps/optional-add-ons-cart-transform/extensions/optional-add-ons-rust/src/main.rs
function main (line 4) | fn main() {
FILE: sample-apps/optional-add-ons-cart-transform/extensions/optional-add-ons-rust/src/run.rs
function run (line 17) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function get_update_cart_operations (line 30) | fn get_update_cart_operations(
function get_warranty_added (line 91) | fn get_warranty_added(line: &InputCartLines) -> bool {
function get_warranty_cost_percentage (line 101) | fn get_warranty_cost_percentage(line: &InputCartLines) -> f64 {
FILE: sample-apps/payment-customizations/.graphqlrc.js
function getConfig (line 5) | function getConfig() {
FILE: sample-apps/payment-customizations/app/entry.server.jsx
function handleRequest (line 10) | async function handleRequest(
FILE: sample-apps/payment-customizations/app/root.jsx
function App (line 3) | function App() {
FILE: sample-apps/payment-customizations/app/routes/_index/route.jsx
function App (line 18) | function App() {
FILE: sample-apps/payment-customizations/app/routes/app._index.jsx
function Index (line 82) | function Index() {
FILE: sample-apps/payment-customizations/app/routes/app.additional.jsx
function AdditionalPage (line 3) | function AdditionalPage() {
FILE: sample-apps/payment-customizations/app/routes/app.jsx
function App (line 14) | function App() {
function ErrorBoundary (line 29) | function ErrorBoundary() {
FILE: sample-apps/payment-customizations/app/routes/app.payment-customization.$functionId.$id.jsx
function PaymentCustomization (line 134) | function PaymentCustomization() {
FILE: sample-apps/payment-customizations/app/routes/auth.login/error.server.js
function loginErrorMessage (line 3) | function loginErrorMessage(loginErrors) {
FILE: sample-apps/payment-customizations/app/routes/auth.login/route.jsx
function Auth (line 22) | function Auth() {
FILE: sample-apps/payment-customizations/extensions/payment-customization-js/src/run.js
constant NO_CHANGES (line 12) | const NO_CHANGES = {
function run (line 20) | function run(input) {
FILE: sample-apps/payment-customizations/extensions/payment-customization-rust/src/main.rs
function main (line 4) | fn main() {
FILE: sample-apps/payment-customizations/extensions/payment-customization-rust/src/run.rs
type Configuration (line 9) | struct Configuration {
method from_str (line 16) | fn from_str(value: &str) -> Self {
function run (line 22) | fn run(input: input::ResponseData) -> Result<output::FunctionRunResult> {
function test_returns_no_operations_without_configuration (line 65) | fn test_returns_no_operations_without_configuration() -> Result<()> {
function test_returns_no_operations_if_total_less_than_configured (line 93) | fn test_returns_no_operations_if_total_less_than_configured() -> Result<...
function test_returns_no_operations_if_no_payment_method_matches_configured_name (line 126) | fn test_returns_no_operations_if_no_payment_method_matches_configured_na...
function test_hides_matching_payment_method (line 159) | fn test_hides_matching_payment_method() -> Result<()> {
FILE: sample-apps/payment-customizations/prisma/migrations/20240530213853_create_session_table/migration.sql
type "Session" (line 2) | CREATE TABLE "Session" (
FILE: sample-apps/update-line-item/extensions/update-line-item-js/src/run.js
constant NO_CHANGES (line 20) | const NO_CHANGES = {
function run (line 28) | function run(input) {
function optionallyBuildUpdateOperation (line 51) | function optionallyBuildUpdateOperation(
FILE: util/expand-liquid.js
function expandLiquidTemplates (line 14) | async function expandLiquidTemplates(template, liquidData) {
function expandAppLiquidTemplates (line 29) | async function expandAppLiquidTemplates(appDir) {
function directoryNames (line 56) | async function directoryNames(parentPath) {
function expandExtensionLiquidTemplates (line 62) | async function expandExtensionLiquidTemplates(domainName, flavor) {
function ensureNoGitChanges (line 110) | function ensureNoGitChanges() {
constant SAMPLE_APP_DIR (line 132) | const SAMPLE_APP_DIR = 'sample-apps';
constant DOMAINS (line 135) | const DOMAINS = ['checkout', 'discounts', 'order-routing'];
Condensed preview — 692 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (5,607K chars).
[
{
"path": ".github/ISSUE_TEMPLATE/config.yml",
"chars": 435,
"preview": "blank_issues_enabled: false\ncontact_links:\n - name: Functions on Shopify Community\n url: https://community.shopify.c"
},
{
"path": ".github/ISSUE_TEMPLATE/template-or-example-issue.md",
"chars": 986,
"preview": "---\nname: Issue with a template or sample\nabout: Log an issue regarding the template and sample code in this repo.\ntitle"
},
{
"path": ".github/dependabot.yaml",
"chars": 114,
"preview": "version: 2\nupdates:\n - package-ecosystem: github-actions\n directory: \"/\"\n schedule:\n interval: weekly\n"
},
{
"path": ".github/workflows/cla.yml",
"chars": 591,
"preview": "name: Contributor License Agreement (CLA)\n\non:\n pull_request_target:\n types: [opened, synchronize]\n issue_comment:\n"
},
{
"path": ".github/workflows/javascript.yml",
"chars": 538,
"preview": "name: JavaScript\n\non:\n push:\n branches: [ \"main\" ]\n pull_request:\n branches: [ \"main\" ]\n\njobs:\n test:\n runs-"
},
{
"path": ".github/workflows/rust.yml",
"chars": 834,
"preview": "name: Rust\n\non:\n push:\n branches: [ \"main\" ]\n pull_request:\n branches: [ \"main\" ]\n\nenv:\n CARGO_TERM_COLOR: alwa"
},
{
"path": ".github/workflows/typescript.yml",
"chars": 538,
"preview": "name: TypeScript\n\non:\n push:\n branches: [ \"main\" ]\n pull_request:\n branches: [ \"main\" ]\n\njobs:\n test:\n runs-"
},
{
"path": ".gitignore",
"chars": 749,
"preview": "node_modules\n**/target/\n*.wasm\n.env\n.DS_Store\n.yalc\nyarn.lock\n\n# These files are generated from Shopify CLI templating a"
},
{
"path": ".graphqlrc.cjs",
"chars": 1414,
"preview": "/**\n * Configures the GraphQL language server for all the function schemas in this repo.\n */\nconst fs = require('node:fs"
},
{
"path": "CODE_OF_CONDUCT.md",
"chars": 5224,
"preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
},
{
"path": "Cargo.toml",
"chars": 700,
"preview": "[workspace]\nmembers = [\n \"*/rust/*/*\",\n \"sample-apps/*/extensions/*\",\n]\nexclude = [\n # Excludes do not support "
},
{
"path": "LICENSE.md",
"chars": 1062,
"preview": "\nCopyright 2021-present, Shopify Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of t"
},
{
"path": "README.md",
"chars": 741,
"preview": "# Function Examples\n\nThis is the home of all the public examples of Shopify Functions. It's used by the CLI when running"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/.gitignore",
"chars": 15,
"preview": "dist\ngenerated\n"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/schema.graphql",
"chars": 81811,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nOnly allow the field to be queried when targeting one of the spe"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/shopify.extension.toml.liquid",
"chars": 351,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/src/index.liquid",
"chars": 23,
"preview": "export * from './run';\n"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/src/run.graphql.liquid",
"chars": 65,
"preview": "query RunInput {\n cart {\n lines {\n quantity\n }\n }\n}\n"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/src/run.liquid",
"chars": 979,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n// @ts-check\n\n/**\n * @typedef {import(\"../generated/api\").RunInput} RunInput\n * "
},
{
"path": "checkout/javascript/cart-checkout-validation/default/src/run.test.liquid",
"chars": 1931,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './run';\n\n/**"
},
{
"path": "checkout/javascript/cart-checkout-validation/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "checkout/javascript/cart-transform/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "checkout/javascript/cart-transform/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/javascript/cart-transform/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "checkout/javascript/cart-transform/default/schema.graphql",
"chars": 74723,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/javascript/cart-transform/default/shopify.extension.toml.liquid",
"chars": 410,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/javascript/cart-transform/default/src/index.liquid",
"chars": 23,
"preview": "export * from './run';\n"
},
{
"path": "checkout/javascript/cart-transform/default/src/run.graphql.liquid",
"chars": 74,
"preview": "query RunInput {\n cart {\n lines {\n id\n quantity\n }\n }\n}\n"
},
{
"path": "checkout/javascript/cart-transform/default/src/run.liquid",
"chars": 675,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n// @ts-check\n\n/**\n * @typedef {import(\"../generated/api\").RunInput} RunInput\n * "
},
{
"path": "checkout/javascript/cart-transform/default/src/run.test.liquid",
"chars": 890,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './run';\n\n/**"
},
{
"path": "checkout/javascript/cart-transform/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "checkout/javascript/delivery-customization/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "checkout/javascript/delivery-customization/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/javascript/delivery-customization/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "checkout/javascript/delivery-customization/default/schema.graphql",
"chars": 78848,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/javascript/delivery-customization/default/shopify.extension.toml.liquid",
"chars": 418,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/javascript/delivery-customization/default/src/index.liquid",
"chars": 23,
"preview": "export * from './run';\n"
},
{
"path": "checkout/javascript/delivery-customization/default/src/run.graphql.liquid",
"chars": 175,
"preview": "query RunInput {\n deliveryCustomization {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", ke"
},
{
"path": "checkout/javascript/delivery-customization/default/src/run.liquid",
"chars": 917,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n// @ts-check\n\n/**\n * @typedef {import(\"../generated/api\").RunInput} RunInput\n * "
},
{
"path": "checkout/javascript/delivery-customization/default/src/run.test.liquid",
"chars": 1040,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './run';\n\n/**"
},
{
"path": "checkout/javascript/delivery-customization/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "checkout/javascript/payment-customization/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "checkout/javascript/payment-customization/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/javascript/payment-customization/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "checkout/javascript/payment-customization/default/schema.graphql",
"chars": 80578,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/javascript/payment-customization/default/shopify.extension.toml.liquid",
"chars": 417,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/javascript/payment-customization/default/src/index.liquid",
"chars": 23,
"preview": "export * from './run';\n"
},
{
"path": "checkout/javascript/payment-customization/default/src/run.graphql.liquid",
"chars": 174,
"preview": "query RunInput {\n paymentCustomization {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key"
},
{
"path": "checkout/javascript/payment-customization/default/src/run.liquid",
"chars": 915,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n// @ts-check\n\n/**\n * @typedef {import(\"../generated/api\").RunInput} RunInput\n * "
},
{
"path": "checkout/javascript/payment-customization/default/src/run.test.liquid",
"chars": 1037,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './run';\n\n/**"
},
{
"path": "checkout/javascript/payment-customization/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "checkout/rust/cart-checkout-validation/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "checkout/rust/cart-checkout-validation/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "checkout/rust/cart-checkout-validation/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/rust/cart-checkout-validation/default/schema.graphql",
"chars": 81811,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nOnly allow the field to be queried when targeting one of the spe"
},
{
"path": "checkout/rust/cart-checkout-validation/default/shopify.extension.toml.liquid",
"chars": 478,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/rust/cart-checkout-validation/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "checkout/rust/cart-checkout-validation/default/src/run.graphql.liquid",
"chars": 62,
"preview": "query Input {\n cart {\n lines {\n quantity\n }\n }\n}\n"
},
{
"path": "checkout/rust/cart-checkout-validation/default/src/run.rs",
"chars": 2276,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\nuse serde::{Deserialize, Serialize};\n\n#[derive(Serializ"
},
{
"path": "checkout/rust/cart-transform/bundles/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "checkout/rust/cart-transform/bundles/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "checkout/rust/cart-transform/bundles/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/rust/cart-transform/bundles/schema.graphql",
"chars": 74723,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/rust/cart-transform/bundles/shopify.extension.toml.liquid",
"chars": 520,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/rust/cart-transform/bundles/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "checkout/rust/cart-transform/bundles/src/run.graphql.liquid",
"chars": 793,
"preview": "query Input {\n cart {\n lines {\n id\n quantity\n merchandise {\n __typename\n ... on Product"
},
{
"path": "checkout/rust/cart-transform/bundles/src/run.rs",
"chars": 7672,
"preview": "use run::input::InputCart as Cart;\nuse run::input::InputCartLinesMerchandise::ProductVariant;\nuse run::input::InputCartL"
},
{
"path": "checkout/rust/cart-transform/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "checkout/rust/cart-transform/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "checkout/rust/cart-transform/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/rust/cart-transform/default/schema.graphql",
"chars": 74723,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/rust/cart-transform/default/shopify.extension.toml.liquid",
"chars": 539,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/rust/cart-transform/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "checkout/rust/cart-transform/default/src/run.graphql.liquid",
"chars": 71,
"preview": "query Input {\n cart {\n lines {\n id\n quantity\n }\n }\n}\n"
},
{
"path": "checkout/rust/cart-transform/default/src/run.rs",
"chars": 382,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\n#[allow(clippy::upper_case_acronyms)]\ntype URL = String"
},
{
"path": "checkout/rust/delivery-customization/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "checkout/rust/delivery-customization/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "checkout/rust/delivery-customization/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/rust/delivery-customization/default/schema.graphql",
"chars": 78848,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/rust/delivery-customization/default/shopify.extension.toml.liquid",
"chars": 547,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/rust/delivery-customization/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "checkout/rust/delivery-customization/default/src/run.graphql.liquid",
"chars": 172,
"preview": "query Input {\n deliveryCustomization {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: "
},
{
"path": "checkout/rust/delivery-customization/default/src/run.rs",
"chars": 1518,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\nuse serde::{Deserialize, Serialize};\n\n#[derive(Serializ"
},
{
"path": "checkout/rust/payment-customization/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "checkout/rust/payment-customization/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "checkout/rust/payment-customization/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/rust/payment-customization/default/schema.graphql",
"chars": 80578,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/rust/payment-customization/default/shopify.extension.toml.liquid",
"chars": 546,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/rust/payment-customization/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "checkout/rust/payment-customization/default/src/run.graphql.liquid",
"chars": 171,
"preview": "query Input {\n paymentCustomization {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \""
},
{
"path": "checkout/rust/payment-customization/default/src/run.rs",
"chars": 1515,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\nuse serde::{Deserialize, Serialize};\n\n#[derive(Serializ"
},
{
"path": "checkout/wasm/cart-checkout-validation/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/wasm/cart-checkout-validation/default/run.graphql.liquid",
"chars": 62,
"preview": "query Input {\n cart {\n lines {\n quantity\n }\n }\n}\n"
},
{
"path": "checkout/wasm/cart-checkout-validation/default/schema.graphql",
"chars": 81811,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nOnly allow the field to be queried when targeting one of the spe"
},
{
"path": "checkout/wasm/cart-checkout-validation/default/shopify.extension.toml.liquid",
"chars": 363,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/wasm/cart-transform/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/wasm/cart-transform/default/run.graphql.liquid",
"chars": 71,
"preview": "query Input {\n cart {\n lines {\n id\n quantity\n }\n }\n}\n"
},
{
"path": "checkout/wasm/cart-transform/default/schema.graphql",
"chars": 74723,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/wasm/cart-transform/default/shopify.extension.toml.liquid",
"chars": 422,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/wasm/delivery-customization/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/wasm/delivery-customization/default/run.graphql.liquid",
"chars": 172,
"preview": "query Input {\n deliveryCustomization {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: "
},
{
"path": "checkout/wasm/delivery-customization/default/schema.graphql",
"chars": 78848,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/wasm/delivery-customization/default/shopify.extension.toml.liquid",
"chars": 430,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "checkout/wasm/payment-customization/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "checkout/wasm/payment-customization/default/run.graphql.liquid",
"chars": 171,
"preview": "query Input {\n paymentCustomization {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \""
},
{
"path": "checkout/wasm/payment-customization/default/schema.graphql",
"chars": 80578,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "checkout/wasm/payment-customization/default/shopify.extension.toml.liquid",
"chars": 429,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/javascript/discount/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/javascript/discount/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "discounts/javascript/discount/default/schema.graphql",
"chars": 98184,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nOnly allow the field to be queried when targeting one of the spe"
},
{
"path": "discounts/javascript/discount/default/shopify.extension.toml.liquid",
"chars": 639,
"preview": "api_version = \"2025-04\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/javascript/discount/default/src/cart_delivery_options_discounts_generate_run.graphql.liquid",
"chars": 110,
"preview": "query DeliveryInput {\n cart {\n deliveryGroups {\n id\n }\n }\n discount {\n discountClasses\n }\n}\n"
},
{
"path": "discounts/javascript/discount/default/src/cart_delivery_options_discounts_generate_run.liquid",
"chars": 2648,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport {\n DeliveryDiscountSelectionStrategy,\n DiscountClass,\n} from \"../genera"
},
{
"path": "discounts/javascript/discount/default/src/cart_delivery_options_discounts_generate_run.test.liquid",
"chars": 4590,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport {describe, it, expect} from \"vitest\";\n\nimport {cartDeliveryOptionsDiscoun"
},
{
"path": "discounts/javascript/discount/default/src/cart_lines_discounts_generate_run.graphql.liquid",
"chars": 170,
"preview": "query CartInput {\n cart {\n lines {\n id\n cost {\n subtotalAmount {\n amount\n }\n }"
},
{
"path": "discounts/javascript/discount/default/src/cart_lines_discounts_generate_run.liquid",
"chars": 4318,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport {\n DiscountClass,\n OrderDiscountSelectionStrategy,\n ProductDiscountSel"
},
{
"path": "discounts/javascript/discount/default/src/cart_lines_discounts_generate_run.test.liquid",
"chars": 8493,
"preview": "\n{%- if flavor contains \"vanilla-js\" -%}\nimport {describe, it, expect} from \"vitest\";\n\nimport {cartLinesDiscountsGenerat"
},
{
"path": "discounts/javascript/discount/default/src/index.liquid",
"chars": 117,
"preview": "export * from './cart_lines_discounts_generate_run';\nexport * from './cart_delivery_options_discounts_generate_run';\n"
},
{
"path": "discounts/javascript/discount/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "discounts/javascript/discounts-allocator/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "discounts/javascript/discounts-allocator/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/javascript/discounts-allocator/default/package.json.liquid",
"chars": 805,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "discounts/javascript/discounts-allocator/default/schema.graphql",
"chars": 84395,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/javascript/discounts-allocator/default/shopify.extension.toml.liquid",
"chars": 416,
"preview": "api_version = \"unstable\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ u"
},
{
"path": "discounts/javascript/discounts-allocator/default/src/index.liquid",
"chars": 22,
"preview": "export * from './run';"
},
{
"path": "discounts/javascript/discounts-allocator/default/src/run.graphql.liquid",
"chars": 158,
"preview": "query RunInput {\n shop {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"function-conf"
},
{
"path": "discounts/javascript/discounts-allocator/default/src/run.liquid",
"chars": 683,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n/**\n * @typedef {import(\"../generated/api\").RunInput} RunInput\n * @typedef {impo"
},
{
"path": "discounts/javascript/discounts-allocator/default/src/run.test.liquid",
"chars": 967,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport {describe, it, expect} from 'vitest';\nimport {run} from './run';\nimport D"
},
{
"path": "discounts/javascript/discounts-allocator/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "discounts/javascript/order-discounts/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "discounts/javascript/order-discounts/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/javascript/order-discounts/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "discounts/javascript/order-discounts/default/schema.graphql",
"chars": 84777,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/javascript/order-discounts/default/shopify.extension.toml.liquid",
"chars": 410,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/javascript/order-discounts/default/src/index.liquid",
"chars": 22,
"preview": "export * from './run';"
},
{
"path": "discounts/javascript/order-discounts/default/src/run.graphql.liquid",
"chars": 166,
"preview": "query RunInput {\n discountNode {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"funct"
},
{
"path": "discounts/javascript/order-discounts/default/src/run.liquid",
"chars": 1175,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n// @ts-check\nimport { DiscountApplicationStrategy } from \"../generated/api\";\n\n/*"
},
{
"path": "discounts/javascript/order-discounts/default/src/run.test.liquid",
"chars": 1159,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './index';\n\n/"
},
{
"path": "discounts/javascript/order-discounts/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "discounts/javascript/product-discounts/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "discounts/javascript/product-discounts/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/javascript/product-discounts/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "discounts/javascript/product-discounts/default/schema.graphql",
"chars": 83211,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/javascript/product-discounts/default/shopify.extension.toml.liquid",
"chars": 412,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/javascript/product-discounts/default/src/index.liquid",
"chars": 22,
"preview": "export * from './run';"
},
{
"path": "discounts/javascript/product-discounts/default/src/run.graphql.liquid",
"chars": 166,
"preview": "query RunInput {\n discountNode {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"funct"
},
{
"path": "discounts/javascript/product-discounts/default/src/run.liquid",
"chars": 1175,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n// @ts-check\nimport { DiscountApplicationStrategy } from \"../generated/api\";\n\n/*"
},
{
"path": "discounts/javascript/product-discounts/default/src/run.test.liquid",
"chars": 1159,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './run';\n\n/**"
},
{
"path": "discounts/javascript/product-discounts/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "discounts/javascript/shipping-discounts/default/.gitignore",
"chars": 14,
"preview": "dist\ngenerated"
},
{
"path": "discounts/javascript/shipping-discounts/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/javascript/shipping-discounts/default/package.json.liquid",
"chars": 776,
"preview": "{\n \"name\": \"{{handle}}\",\n \"version\": \"0.0.1\",\n \"license\": \"UNLICENSED\",\n \"scripts\": {\n \"shopify\": \"npm exec -- sh"
},
{
"path": "discounts/javascript/shipping-discounts/default/schema.graphql",
"chars": 79967,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/javascript/shipping-discounts/default/shopify.extension.toml.liquid",
"chars": 413,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/javascript/shipping-discounts/default/src/index.liquid",
"chars": 22,
"preview": "export * from './run';"
},
{
"path": "discounts/javascript/shipping-discounts/default/src/run.graphql.liquid",
"chars": 166,
"preview": "query RunInput {\n discountNode {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"funct"
},
{
"path": "discounts/javascript/shipping-discounts/default/src/run.liquid",
"chars": 966,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\n\n/**\n * @typedef {import(\"../generated/api\").RunInput} RunInput\n * @typedef {imp"
},
{
"path": "discounts/javascript/shipping-discounts/default/src/run.test.liquid",
"chars": 1047,
"preview": "{%- if flavor contains \"vanilla-js\" -%}\nimport { describe, it, expect } from 'vitest';\nimport { run } from './run';\n\n/**"
},
{
"path": "discounts/javascript/shipping-discounts/default/vite.config.js",
"chars": 50,
"preview": "// Prevents inheritance from parent Remix project\n"
},
{
"path": "discounts/rust/discount/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "discounts/rust/discount/default/Cargo.toml.liquid",
"chars": 314,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde_js"
},
{
"path": "discounts/rust/discount/default/README.md",
"chars": 592,
"preview": "# Shopify Function development with Rust\n\n## Dependencies\n\n- [Install Rust](https://www.rust-lang.org/tools/install)\n -"
},
{
"path": "discounts/rust/discount/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/rust/discount/default/schema.graphql",
"chars": 98184,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nOnly allow the field to be queried when targeting one of the spe"
},
{
"path": "discounts/rust/discount/default/shopify.extension.toml.liquid",
"chars": 799,
"preview": "api_version = \"2025-04\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle | replace: \" \", \"-\" | downcase}}\"\ntype = \"fun"
},
{
"path": "discounts/rust/discount/default/src/cart_delivery_options_discounts_generate_run.graphql.liquid",
"chars": 102,
"preview": "query Input {\n cart {\n deliveryGroups {\n id\n }\n }\n discount {\n discountClasses\n }\n}\n"
},
{
"path": "discounts/rust/discount/default/src/cart_delivery_options_discounts_generate_run.rs",
"chars": 1722,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\n#[shopify_function_target(\n query_path = \"src/cart_d"
},
{
"path": "discounts/rust/discount/default/src/cart_lines_discounts_generate_run.graphql.liquid",
"chars": 166,
"preview": "query Input {\n cart {\n lines {\n id\n cost {\n subtotalAmount {\n amount\n }\n }\n "
},
{
"path": "discounts/rust/discount/default/src/cart_lines_discounts_generate_run.rs",
"chars": 3162,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\n#[shopify_function_target(\n query_path = \"src/cart_l"
},
{
"path": "discounts/rust/discount/default/src/main.rs",
"chars": 200,
"preview": "use std::process;\npub mod cart_delivery_options_discounts_generate_run;\npub mod cart_lines_discounts_generate_run;\n\nfn m"
},
{
"path": "discounts/rust/discounts-allocator/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "discounts/rust/discounts-allocator/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "discounts/rust/discounts-allocator/default/README.md",
"chars": 592,
"preview": "# Shopify Function development with Rust\n\n## Dependencies\n\n- [Install Rust](https://www.rust-lang.org/tools/install)\n -"
},
{
"path": "discounts/rust/discounts-allocator/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/rust/discounts-allocator/default/schema.graphql",
"chars": 84395,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/rust/discounts-allocator/default/shopify.extension.toml.liquid",
"chars": 545,
"preview": "api_version = \"unstable\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ u"
},
{
"path": "discounts/rust/discounts-allocator/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "discounts/rust/discounts-allocator/default/src/run.graphql.liquid",
"chars": 155,
"preview": "query Input {\n shop {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"function-configu"
},
{
"path": "discounts/rust/discounts-allocator/default/src/run.rs",
"chars": 1003,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\n#[shopify_function_target(query_path = \"src/run.graphql"
},
{
"path": "discounts/rust/order-discounts/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "discounts/rust/order-discounts/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "discounts/rust/order-discounts/default/README.md",
"chars": 592,
"preview": "# Shopify Function development with Rust\n\n## Dependencies\n\n- [Install Rust](https://www.rust-lang.org/tools/install)\n -"
},
{
"path": "discounts/rust/order-discounts/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/rust/order-discounts/default/schema.graphql",
"chars": 84777,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/rust/order-discounts/default/shopify.extension.toml.liquid",
"chars": 539,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/rust/order-discounts/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "discounts/rust/order-discounts/default/src/run.graphql.liquid",
"chars": 163,
"preview": "query Input {\n discountNode {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"function"
},
{
"path": "discounts/rust/order-discounts/default/src/run.rs",
"chars": 1758,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\nuse serde::{Deserialize, Serialize};\n\n#[derive(Serializ"
},
{
"path": "discounts/rust/product-discounts/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
},
{
"path": "discounts/rust/product-discounts/default/Cargo.toml.liquid",
"chars": 297,
"preview": "[package]\nname = \"{{handle | replace: \" \", \"-\" | downcase}}\"\nversion = \"1.0.0\"\nedition = \"2021\"\n\n[dependencies]\nserde = "
},
{
"path": "discounts/rust/product-discounts/default/README.md",
"chars": 592,
"preview": "# Shopify Function development with Rust\n\n## Dependencies\n\n- [Install Rust](https://www.rust-lang.org/tools/install)\n -"
},
{
"path": "discounts/rust/product-discounts/default/locales/en.default.json.liquid",
"chars": 54,
"preview": "{\n \"name\": \"{{name}}\",\n \"description\": \"{{name}}\"\n}\n"
},
{
"path": "discounts/rust/product-discounts/default/schema.graphql",
"chars": 83211,
"preview": "schema {\n query: Input\n mutation: MutationRoot\n}\n\n\"\"\"\nScale the Functions resource limits based on the field's length."
},
{
"path": "discounts/rust/product-discounts/default/shopify.extension.toml.liquid",
"chars": 541,
"preview": "api_version = \"2025-01\"\n\n[[extensions]]\nname = \"t:name\"\nhandle = \"{{handle}}\"\ntype = \"function\"\n{% if uid %}uid = \"{{ ui"
},
{
"path": "discounts/rust/product-discounts/default/src/main.rs",
"chars": 116,
"preview": "use std::process;\npub mod run;\n\nfn main() {\n eprintln!(\"Please invoke a named export.\");\n process::exit(1);\n}\n"
},
{
"path": "discounts/rust/product-discounts/default/src/run.graphql.liquid",
"chars": 163,
"preview": "query Input {\n discountNode {\n metafield(namespace: \"$app:{{handle | replace: \" \", \"-\" | downcase}}\", key: \"function"
},
{
"path": "discounts/rust/product-discounts/default/src/run.rs",
"chars": 1758,
"preview": "use shopify_function::prelude::*;\nuse shopify_function::Result;\n\nuse serde::{Deserialize, Serialize};\n\n#[derive(Serializ"
},
{
"path": "discounts/rust/shipping-discounts/default/.gitignore",
"chars": 19,
"preview": "/target\nCargo.lock\n"
}
]
// ... and 492 more files (download for full content)
About this extraction
This page contains the full source code of the Shopify/function-examples GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 692 files (4.7 MB), approximately 1.3M tokens, and a symbol index with 283 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.