What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Shopify Functions Cannot query field "tags" on type "Customer".

Shopify Functions Cannot query field "tags" on type "Customer".

JustinWills
Shopify Partner
1 0 0

I was looking for assistance in a Shopify functions query. I was told we could no longer use Script editor, and I am in the process of migrating to the new functions platform.

One of the things we do when selecting a shipping line item is look at the customer's tags. This was straightforward in the Shopify Script editor.

When I use the following graphql query:

query RunInput {
  cart {
    buyerIdentity {
      customer {
        id
      }
      purchasingCompany {
        company {
          id
        }
      }
    }

    deliveryGroups {
      deliveryOptions {
        handle
        title
      }
    }
  }
}

I get the following error:
Cannot query field "tags" on type "Customer".

When reading the docs this should be a valid query:
https://shopify.dev/docs/api/storefront/2024-04/objects/Cart

Please advise,
Justin

Replies 0 (0)