Stub data
Stubbing Liquid variables
{% if event.preview %}
{% assign order = hash %}
{% assign order["source_name"] = "web" %}
{% assign order["admin_graphql_api_id"] = "gid://shopify/Order/1234567890" %}
{% endif %}
{% if order.source_name == "web" %}
{% action "shopify" %}
mutation {
tagsAdd(id: {{ order.admin_graphql_api_id | json }}, tags: "web") {
userErrors { field, message }
}
}
{% endaction %}
{% endif %}Stubbing GraphQL data
Last updated
Was this helpful?