Integrate Shopify with Tailor Platform

In this guide, we will explain how to integrate Shopify with Tailor Platform by leveraging the platform's powerful triggers.

Tailor Platform Triggers

You can integrate Shopify with Tailor Platform using triggers. Refer to executor service guide to learn about different types of triggers.

Automatically push new products to your Shopify store

When you create a new product in the Tailor DB, you may want to seamlessly sync that data with your Shopify store. This integration guide will walk you through the steps to set up a connection between Tailor PF and Shopify, ensuring that every time a new product is added to the Tailor DB, it's automatically pushed to your Shopify storefront.

1. Get the API key

Before you can begin integrating the Tailor Platform with Shopify, you'll need to obtain an API key. This unique key serves as an authentication credential, enabling the Tailor Platform to securely communicate with your Shopify store.

To get your API key, follow the below steps:

  1. Login to your Shopify store and select Settings.

Guide – Log in to Shopify

  1. In the Settings page, select Apps and sales channels and click on Develop apps.

Guide – Shopify settings

  1. Click Create an app, enter the app name and create app.

Guide – Shopify settings

  1. After creating the app, configure the Admin API integration.

Check all the necessary items; at a minimum, ensure that Products R/W is checked. After making all the selections, click Save.

Guide – Shopify Admin API configuration

  1. Install the created app

Click the "Install app" button and follow any additional prompts to complete the installation.

Guide – Shopify install app

  1. Click on "Reveal Token Once" to save your access token

Guide – Shopify API key

2. Create a trigger to push the product to your Shopify Store

Follow the below steps to create an event based trigger.

  1. Enable PublishRecordEvents settings in the Products type
<span><span style="color: var(--shiki-color-text)">Product: tailordb.#Type </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">	Name:        </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">Product</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	Description: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">Product model</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	Settings: {</span></span>
<span><span style="color: var(--shiki-color-text)">		PublishRecordEvents: </span><span style="color: var(--shiki-token-constant)">true</span></span>
<span><span style="color: var(--shiki-color-text)">	}</span></span>
<span><span style="color: var(--shiki-color-text)">	Fields: {</span></span>
<span><span style="color: var(--shiki-color-text)">		name: {</span></span>
<span><span style="color: var(--shiki-color-text)">			Type:        tailordb.#TypeString</span></span>
<span><span style="color: var(--shiki-color-text)">			Description: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">Name of the product.</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		}</span></span>
<span><span style="color: var(--shiki-color-text)">		...</span></span>
<span><span style="color: var(--shiki-color-text)">	}</span></span>
<span><span style="color: var(--shiki-color-text)">}</span></span>
<span></span>
  1. Create a vault to store the API key

Run the following commands to create a vault named shopify-vault and to store the secret key.

<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">workspace</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">vault</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">create</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">--name</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">shopify-vault</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">workspace</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">vault</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">secret</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">create</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">--name</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">shopify-key</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">--vault</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">shopify-vault</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">--value</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">{</span><span style="color: var(--shiki-color-text)">$your_API_key</span><span style="color: var(--shiki-token-string)">}</span></span>
<span></span>
  1. Add the trigger

Below is an example of the trigger that will push new product to Shopify store when a product is added to the Tailor DB.

<span><span style="color: var(--shiki-token-keyword)">package</span><span style="color: var(--shiki-color-text)"> executor</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">import</span><span style="color: var(--shiki-color-text)"> (</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">github.com/tailor-platform/tailorctl/schema/v2/executor</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">github.com/tailor-platform/tailorctl/schema/v2/common</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">github.com/tailor-platform/tailorctl/schema/v2/secretmanager</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">tailor.build/template/environment</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">)</span></span>
<span></span>
<span><span style="color: var(--shiki-color-text)">executor.#Spec </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">	Executors: [</span></span>
<span><span style="color: var(--shiki-color-text)">		#pushItemToShopify</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">	]</span></span>
<span><span style="color: var(--shiki-color-text)">}</span></span>
<span></span>
<span><span style="color: var(--shiki-color-text)">#pushItemToShopify: executor.#Executor </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">	Name:        </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">product</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	Description: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">Push item to Shopify</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	Trigger: executor.#TriggerEvent </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">		EventType: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">tailordb.type_record.created</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		Condition: common.#Script </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">			Expr: </span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-token-string-expression)">				args.NamespaceName == &quot;\(environment.#app.namespace)&quot; &amp;&amp; args.TypeName == &quot;Product&quot;</span></span>
<span><span style="color: var(--shiki-token-string-expression)">				</span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		}</span></span>
<span><span style="color: var(--shiki-color-text)">	}</span></span>
<span><span style="color: var(--shiki-color-text)">	Target: executor.#TargetWebhook </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">		URL: common.#Script </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">			Expr: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">\&quot;https://your-store.myshopify.com/admin/api/2024-04/products.json\&quot;</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		}</span></span>
<span><span style="color: var(--shiki-color-text)">		Headers: [</span></span>
<span><span style="color: var(--shiki-color-text)">			{</span></span>
<span><span style="color: var(--shiki-color-text)">				Key:   </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">X-Shopify-Access-Token</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">				Value: secretmanager.#SecretValue </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">					VaultName: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">shopify-vault</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">					SecretKey: </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">shopify-key</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">				}</span></span>
<span><span style="color: var(--shiki-color-text)">			}</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">		]</span></span>
<span><span style="color: var(--shiki-color-text)">		Body: common.#Script </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">			Expr: </span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-token-string-expression)">			( {&quot;product&quot;: {&quot;title&quot;: args.data.newRecord.name}} )</span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		}</span></span>
<span><span style="color: var(--shiki-color-text)">	}</span></span>
<span><span style="color: var(--shiki-color-text)">}</span></span>
<span></span>
  1. Apply the change using tailorctl

Run the following command to apply the changes.

<span><span style="color: var(--shiki-token-comment)"># Generate new cue files replacing the variables</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">manifest</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">tidy</span></span>
<span><span style="color: var(--shiki-token-function)">cue</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">eval</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-f</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">manifest/workspace.cue</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-o</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">generated/workspace.cue</span></span>
<span></span>
<span><span style="color: var(--shiki-token-comment)"># Apply Executor</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">workspace</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">apply</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-m</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">generated/workspace.cue</span></span>
<span></span>
  1. Verify the trigger

Run the following query to create a new product.

<span><span style="color: var(--shiki-token-keyword)">mutation</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">  createProduct(input: { </span><span style="color: var(--shiki-token-string)">description</span><span style="color: var(--shiki-color-text)">: </span><span style="color: var(--shiki-token-string-expression)">&quot;Comfortable antibacterial shirt&quot;</span><span style="color: var(--shiki-color-text)">, </span><span style="color: var(--shiki-token-string)">name</span><span style="color: var(--shiki-color-text)">: </span><span style="color: var(--shiki-token-string-expression)">&quot;Linen shirt 1&quot;</span><span style="color: var(--shiki-color-text)">}) {</span></span>
<span><span style="color: var(--shiki-color-text)">    id</span></span>
<span><span style="color: var(--shiki-color-text)">  }</span></span>
<span><span style="color: var(--shiki-color-text)">}</span></span>
<span></span>

After running the above mutation, you can see that the product is automatically pushed to your Shopify store.

Guide – Shopify verify new product

See Event based triggers to learn more.

Get notification from Shopify on new Product creation

To get notifications about particular events in the store, you can use incoming webhook trigger in the Tailor Platform.

Here's a step-by-step guide on how to set up an incoming webhook trigger in the Tailor Platform to receive notifications.

1. Create an Incoming Webhook Trigger

Follow the steps below to create an incoming webhook trigger

  1. Add an incoming webhook trigger in the executor.cue manifest
<span><span style="color: var(--shiki-token-keyword)">package</span><span style="color: var(--shiki-color-text)"> executor</span></span>
<span></span>
<span><span style="color: var(--shiki-token-keyword)">import</span><span style="color: var(--shiki-color-text)"> (</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">github.com/tailor-platform/tailorctl/schema/v2/executor</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">github.com/tailor-platform/tailorctl/schema/v2/common</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">tailor.build/template/environment</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	</span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">tailor.build/template/manifest/services/pipeline</span><span style="color: var(--shiki-color-text)">:settings</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">)</span></span>
<span></span>
<span><span style="color: var(--shiki-color-text)">executor.#Spec </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">	Executors: [</span></span>
<span><span style="color: var(--shiki-color-text)">		#incomingWebhookBasedExecutor</span><span style="color: var(--shiki-token-punctuation)">,</span></span>
<span><span style="color: var(--shiki-color-text)">	]</span></span>
<span><span style="color: var(--shiki-color-text)">}</span></span>
<span></span>
<span><span style="color: var(--shiki-color-text)">#incomingWebhookBasedExecutor: executor.#Executor </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">	Name:    </span><span style="color: var(--shiki-color-text)">&quot;</span><span style="color: var(--shiki-token-string-expression)">incomingwebhook-executor</span><span style="color: var(--shiki-color-text)">&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">	Trigger: executor.#TriggerIncomingWebhook</span></span>
<span><span style="color: var(--shiki-color-text)">	Target: executor.#TargetTailorGraphql </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">		AppName: environment.#app.namespace</span></span>
<span><span style="color: var(--shiki-color-text)">		Invoker: settings.adminInvoker</span></span>
<span><span style="color: var(--shiki-color-text)">		Query: </span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-token-string-expression)">			mutation createProduct($name: String!) {</span></span>
<span><span style="color: var(--shiki-token-string-expression)">				createProduct(input: { name: $name }) {</span></span>
<span><span style="color: var(--shiki-token-string-expression)">					id</span></span>
<span><span style="color: var(--shiki-token-string-expression)">				}</span></span>
<span><span style="color: var(--shiki-token-string-expression)">			}</span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		Variables: common.#Script </span><span style="color: var(--shiki-token-keyword)">&amp;</span><span style="color: var(--shiki-color-text)"> {</span></span>
<span><span style="color: var(--shiki-color-text)">			Expr: </span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-token-string-expression)">			({</span></span>
<span><span style="color: var(--shiki-token-string-expression)">				&quot;name&quot;: args.data.title,</span></span>
<span><span style="color: var(--shiki-token-string-expression)">			})</span><span style="color: var(--shiki-color-text)">&quot;&quot;&quot;</span></span>
<span><span style="color: var(--shiki-color-text)">		}</span></span>
<span><span style="color: var(--shiki-color-text)">	}</span></span>
<span><span style="color: var(--shiki-color-text)">}</span></span>
<span></span>
  1. Apply the change using tailorctl
<span><span style="color: var(--shiki-token-comment)"># Generate new cue files replacing the variables</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">manifest</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">tidy</span></span>
<span><span style="color: var(--shiki-token-function)">cue</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">eval</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-f</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">manifest/workspace.cue</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-o</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">generated/workspace.cue</span></span>
<span></span>
<span><span style="color: var(--shiki-token-comment)"># Apply Executor</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">workspace</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">apply</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-m</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">generated/workspace.cue</span></span>
<span></span>

2. Configure Shopify to Send Notifications

Follow the steps below to get the endpoint to configure Shopify

  1. Get the secret for the incoming webhook
curl --request POST \
  --url https://api.tailor.tech/operator.v1.OperatorService/ListExecutorExecutors \
  --header 'Authorization: Bearer {access_token}' \
  --header 'Content-Type: application/json' \
  --data '{
	"workspace_id": "${your_workspace_id}"
  }'

To get the access token run the following command and copy the controlplaneaccesstoken.

cat ~/.tailorctl/config

Upon successful request you'll get the following response.

{
   "executors":[
      {
      "name": "incomingwebhook-executor",
      "triggerType": "EXECUTOR_TRIGGER_TYPE_INCOMING_WEBHOOK",
      "triggerConfig": {
        "incomingWebhook": { "secret": "{your_secret}" }
      },
      "targetType": "EXECUTOR_TARGET_TYPE_TAILOR_GRAPHQL",
      "targetConfig": {
        "tailorGraphql": {
          "appName": "{your_app_name}",
          "query": "\t\t\tmutation createProduct($name: String!) {\n\t\t\t\tcreateProduct(input: { name: $name }) {\n\t\t\t\t\tid\n\t\t\t\t}\n\t\t\t}",
          "variables": {
            "expr": "\t\t\t({\n\t\t\t\t\"input\": {\"name\": args.data.title},\n\t\t\t})"
          }
        }
      }
    },
   ]
}
  1. Construct the webhook URL

You can construct the URL by using the information from the executor.

https://api.tailor.tech/v1/executor/workspaces/{your_workspace_id}/executors/{name_of_the_executor}/invokeIncomingWebhook/{your_secret}
  1. Configure Shopify

Here are the steps to add a webhook

  1. Login to your Shopify store and select Settings. In the Settings page, select Notifications and click on Webhooks.

Guide – Shopify notifications

  1. Create Webhook

Choose Product creation event from the dropdown, paste the url constructed in step 2 and click Save to create the webhook.

Guide – Shopify notifications

You have now successfully created the webhook to receive notifications in the Tailor platform from the Shopify store for the Product creation event.

3. Verify the trigger

You can open the GraphQL playground to verify the product created in Shopify is added to Tailor DB.

<span><span style="color: var(--shiki-token-comment)"># Open the GraphQL playground in the browser</span></span>
<span><span style="color: var(--shiki-token-function)">tailorctl</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">workspace</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">app</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">open</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">-n</span><span style="color: var(--shiki-color-text)"> </span><span style="color: var(--shiki-token-string)">inventory-tracker</span></span>
<span></span>

Run the following query to view all the products.

query {
  products{
    collection {
      id,
      name,
    }
  }
}