graphql
Last updated
Last updated
graphql
is one of the most important filters. It calls Shopify GraphQL endpoint to fetch (query) or update (mutation) store data. Any Shopify GraphQL request can be used. Complete documentation of Shopify's GraphQL can be found here:
Let's add a tag to a customer.
First, using Shopify GraphQL reference, we need to find mutation that will allow us to do so. Use capture
tag to define our mutation.
From the above we see that mutation needs an object id and tag we want to add. Let's use again capture
tag to define our mutation variables.
Before we execute above GraphQL mutation we need to tell compiler what to expect in order to evaluate required permission for executing this task. See more here.
Now we have everything. Last step is to use graphql
filter to execute the query.